Commit 001f689f authored by Kruyff,D.L.W. (Dylan)'s avatar Kruyff,D.L.W. (Dylan)
Browse files

Added lsh to git + more documentation

Former-commit-id: 9353b768
parent 0bc4db2d
......@@ -10,7 +10,7 @@
<div class="button-holder">
<button *ngIf="show" (click)="updateQuery()" class="train-button">Query</button>
<!-- <button *ngIf="show" (click)="updateQuery()" class="train-button">Query</button>-->
<button *ngIf="show" (click)="train()" class="train-button">Train</button>
......@@ -28,7 +28,7 @@ export class OverviewWindowComponent implements OnInit {
async initializePlot() {
this.state.queryWindow = undefined;
// this.debugClicked(); = [];
for (let i = 0; i < this.state.rawData.values.length; i++) {[this.state.rawData.index[i], this.state.rawData.values[i]]);
......@@ -155,6 +155,8 @@ export class OverviewWindowComponent implements OnInit {
this.state.querySelectionMode = false;
await this.debugClicked();
const xyInformation = zingchart.exec('zingchart-ng-1', 'getxyinfo', {
x: clickData.x,
y: clickData.y
......@@ -12,8 +12,8 @@ export class TableOverviewComponent implements OnInit {
constructor(private state: StateService) { }
ngOnInit(): void {
this.state.onNewTable.subscribe(() => this.createHistograms());
this.state.onNewTableInfo.subscribe(() => this.createPrototypes());
// this.state.onNewTable.subscribe(() => this.createHistograms());
// this.state.onNewTableInfo.subscribe(() => this.createPrototypes());
createPrototypes(): void {
This diff is collapsed.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
......@@ -94,6 +94,17 @@ def initialize():
print('LSH done: ' + str(time()-t0))
return response
@app.route('/weights', methods=['POST'])
def weights():
raw_data = orjson.loads(
parameters = raw_data["labels"]
# Caculate weights
response = weights
return response
@app.route('/update', methods=['POST'])
def update():
t0 = time()
from distutils.core import setup, Extension
import numpy.distutils.misc_util
c_ext = Extension('_lsh', ['../../lsh-fast/_lsh.cpp', '../../lsh-fast/lsh.cpp'])
c_ext = Extension('_lsh', ['../lsh-fast/_lsh.cpp', '../lsh-fast/lsh.cpp'])
......@@ -10,13 +10,29 @@ The application consists of two parts:
## Setup
To run the application, make sure you've installed the following:
1. Python >=3.5:
2. Flask:
2. Conda:
3. Angular:
Once these are installed on your computer, simply run *run-angular.bat* to set up the client side GUI
and *run-flask.bat* to set up the server side API
### Step 1: Creating an environment
All dependencies are listed in the *environment.yml* file. To create an environment, run the following command:
`conda env create -f environment.yml`
This will create a conda environment named *pseudo*. Now activate the environment as follows:
`conda activate pseudo`
The client-side bat-file should automatically open your browser and connect to http://localhost:4200/
### Step 2: Creating the LSH package
The LSH algorithm is maintained locally for now, so you'll have to create it manually. The file that you need to setup this package is located in the Flaskserver folder (this is more efficient when debugging, as for every change you have to rebuild the package). So the package can be created by running the following code:
`cd Flaskserver`
`python3 build_ext --inplace && python3 install`
`cd ..`
**NOTE 1**: So as a reminder, don't forget to run the 2nd line everytime you change something in the c++ code.
### Step 3: Running PSEUDo
As mentioned before, PSEUDo exists of a gui and a server. A Makefile is provided to setup both easily. Just run the following code for the server and gui respectively:
`make server`
`make gui`
A browser window should automatically be opened when running the GUI. If not, visit http://localhost:4200/
**NOTE 1**: Both gui and server will need their own terminal window.
**NOTE 2**: Make sure the pseudo environment is activated (step 1) when running the server, otherwise you'll get ModuleNotFound errors.
# Documentation
## GUI
......@@ -17,3 +17,5 @@ dependencies:
- pybbi
- sklearn
- cooler
- ucrdtw
- dtw-python
lsh-fast @ 994e1549
Subproject commit 994e1549030ad71d7164ed559b5cd1ab8733ec1a
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment