Commit b340e98a authored by Yuncong Yu's avatar Yuncong Yu
Browse files

Add "load data" in README

parent 869c39b4
...@@ -21,13 +21,13 @@ To run the application, make sure you've installed the following: ...@@ -21,13 +21,13 @@ To run the application, make sure you've installed the following:
4. Java: https://www.java.com/en/download/help/download_options.html 4. Java: https://www.java.com/en/download/help/download_options.html
5. (Only for Windows) `make` in git Bash: https://gist.github.com/evanwill/0207876c3243bbb6863e65ec5dc3f058 5. (Only for Windows) `make` in git Bash: https://gist.github.com/evanwill/0207876c3243bbb6863e65ec5dc3f058
### Step 1: Creating an environment ### Step 1: Create an environment
All dependencies are listed in the *environment.yml* file. To create an environment, run the following command: All dependencies are listed in the *environment.yml* file. To create an environment, run the following command:
`conda env create -f environment.yml` `conda env create -f environment.yml`
This will create a conda environment named *pseudo*. Now activate the environment as follows: This will create a conda environment named *pseudo*. Now activate the environment as follows:
`conda activate pseudo` `conda activate pseudo`
### Step 2: Prepare backend - creating the LSH package ### Step 2: Set up backend - 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 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 backend folder (this is more efficient when debugging, as for every change you have to rebuild the package). located in the backend 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: So the package can be created by running the following code:
...@@ -36,12 +36,12 @@ So the package can be created by running the following code: ...@@ -36,12 +36,12 @@ So the package can be created by running the following code:
`cd ..` `cd ..`
**NOTE 1**: So as a reminder, don't forget to run the 2nd line everytime you change something in the c++ code. **NOTE 1**: So as a reminder, don't forget to run the 2nd line everytime you change something in the c++ code.
### Step 3: Prepare frontend - install Node packages ### Step 3: Set up frontend - install Node packages
The cloned Angular application cannot be launched directly. You have to install the node packages via The cloned Angular application cannot be launched directly. You have to install the node packages via
`cd frontend` `cd frontend`
`npm install` `npm install`
### Step 4: Running PSEUDo ### Step 4: Launch PSEUDo
As mentioned before, PSEUDo has of a user interface and a server. As mentioned before, PSEUDo has of a user interface and a server.
A Makefile is provided to setup both easily. A Makefile is provided to setup both easily.
Just run the following commands from PSEUDo's root directory for the server and ui respectively: Just run the following commands from PSEUDo's root directory for the server and ui respectively:
...@@ -52,8 +52,18 @@ A browser window should automatically be opened when running the UI. If not, vis ...@@ -52,8 +52,18 @@ A browser window should automatically be opened when running the UI. If not, vis
**NOTE 2**: Make sure the pseudo environment is activated (as described in step 1) when running the server, **NOTE 2**: Make sure the pseudo environment is activated (as described in step 1) when running the server,
otherwise you'll get ModuleNotFound errors. otherwise you'll get ModuleNotFound errors.
### Step 5: Load data
config.yml configures the global settings in PSEUDo, including the path of the config file of the used dataset.
Some examples of dataset config files can be found under experiments/configs/.
Currently, PSEUDo supports HDF files containing the data plus a JSON file describing the meta-information of the data (espl. the track names).
An example is the combination of data/eeg_eye_state/eeg_eye_state.hdf and data/eeg_eye_state/metadata.json.
You may want to use [HDFView](https://www.hdfgroup.org/downloads/hdfview/) to explore HDF files and
use the python library [PyTables](https://www.pytables.org/usersguide/tutorials.html) or
[h5py](https://docs.h5py.org/en/stable/index.html) to convert your data into HDF format.
# Documentation # Documentation
## UI ## Frontend Views
The UI is backed up by the Angular framework. The UI is backed up by the Angular framework.
It consists of views (components), a state service and an API service. It consists of views (components), a state service and an API service.
Every time an API call finishes, the state changes. Every time an API call finishes, the state changes.
...@@ -74,7 +84,7 @@ It shows whether the classifier is getting better at understanding the desired p ...@@ -74,7 +84,7 @@ It shows whether the classifier is getting better at understanding the desired p
### Labels ### Labels
shows the currently labeled windows. The user should be able to change and delete labels in this view. shows the currently labeled windows. The user should be able to change and delete labels in this view.
## API ## Backend API
### /load-data ### /load-data
reads time series data from a file and returns the values and indices. reads time series data from a file and returns the values and indices.
### /create-windows ### /create-windows
...@@ -83,7 +93,7 @@ reads time series data and chunks it into windows. For now the windows are saved ...@@ -83,7 +93,7 @@ reads time series data and chunks it into windows. For now the windows are saved
calculates the necessary LSH parameters calculates the necessary LSH parameters
- envolope `r`, - envolope `r`,
- mean distances of all samples pairs `a` and - mean distances of all samples pairs `a` and
- standard deviation of all sample pairs `sd1 - standard deviation of all sample pairs `sd`
based on the dataset. based on the dataset.
### /initialize ### /initialize
......
Supports Markdown
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