You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-22Lines changed: 17 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,12 +19,12 @@ The baseline models, along with the universal count model proposed in our work,
19
19
20
20
21
21
#### 1. cd into ./scripts/
22
-
Here is where all the code for fitting models, analysis and plotting is located.
22
+
Here is where all the code for fitting models is located.
23
23
24
24
25
-
#### 2. (Optional) Run the synthetic_data notebook to generate data from synthetic populations
26
-
This generates the two synthetic populations and saves them into ./data/, both generated spike counts and behaviour as well as the encoding models.
27
-
Note that the population data used in the paper has been included in ./data/, running this script will overwrite those files!
25
+
#### 2. (Optional) Run synthetic_data.py to generate data from synthetic populations
26
+
This script generates the two synthetic populations and saves them into ```./data/```, both generated spike counts and behaviour as well as the encoding models.
27
+
Note that the population data used in the paper has been included in ```./data/```, running this script will overwrite those files!
This runs a model of mode 0 on synthetic data, with `--cv` indicating which cross-validation fold to leave out for validation (-1 indicates using all data) and `--gpu` indicating the GPU device to run on (if available).
38
38
Line 188 in validation.py gives the definition of all modes (numbered 0 to 8), in particular the likelihood (1st element of tuple) and the input space (2d element of tuple) are specified.
39
-
Note there is a 10-fold split of the data, hence the cv trial numbers can go from -1 to 9.
39
+
Note there is a 10-fold split of the data, hence the cv trial integers can range from -1 to 9 (with -1 using all data for training).
40
40
`lr` and `lr_2` indicate the learning rates, with `lr_2` for toroidal kernel lengthscales and variational standard deviations of the latent state posterior (lower for latent models as described in the paper).
41
41
The flag `--ncvx` refers to the number of runs to do (selecting the best fit model after completion to save).
42
42
One can also specify `--batchsize`, which can speed up training when larger depending on the memory capacity of the hardware used.
@@ -49,34 +49,30 @@ Line 108 in HDC.py gives the definition of all modes for the head direction cell
49
49
All possible flags and their default values can be seen in the validation.py and HDC.py scripts.
50
50
The file models.py defines the encoding models and uses the library code (neuroprob) to implement and run these probabilistic models.
51
51
52
-
In terms of neural data, the synthetic populatio data used in the paper and the head direction cell data is included in the ./data/ folder.
52
+
In terms of neural data, the synthetic populatio data used in the paper and the head direction cell data is included in the ```./data/``` folder.
53
53
All required modes in the analysis notebooks can be seen in the code as it loads trained models.
54
54
Note that there are separate notebooks for synthetic (validation) and real (HDC) datasets.
55
-
All trained models are stored in the ./checkpoint/ folder.
55
+
All trained models are stored in the ```./checkpoint/``` folder.
All commands needed for real data and synthetic data experiments are put into bash files ```run_HDC.sh``` and ```run_synthetic.sh``` for convenience.
60
+
Inside the bash files, commands are grouped by categories, such as regression models or latent variable models.
61
+
If you wish to run different modes or cross-validation runs grouped together above in parallel rather than sequentially, run the respective command with only a single `--modes` or `--cv` argument each time and repeat while looping through the list.
If you wish to run different modes or cross-validation runs grouped together above in parallel, run the command several times with only a single mode or cv trial each time.
71
64
65
+
#### 4. cd into ../analysis/
66
+
Here one can find all the Jupyter notebooks for analysis and plotting.
72
67
73
-
#### 4. Run the analysis notebooks to analyze the data
68
+
69
+
#### 5. Run the analysis notebooks to analyze the data
74
70
By running the analysis notebooks, we reproduce the plotting data for figures in the paper.
75
-
Intermediate files (pickled) will be stored in the ./checkpoint/ folder.
71
+
Intermediate files (pickled) will be stored in the ```./saves/``` folder.
76
72
77
73
78
-
#### 5. Run the plotting notebooks
79
-
This loads the analysis results and plots paper figures in .pdf and .svg formats, exported to the ./output/ folder.
74
+
#### 6. Run the plotting notebooks
75
+
This loads the analysis results and plots paper figures in .pdf and .svg formats, exported to the ```./output/``` folder.
80
76
81
77
82
78
@@ -101,7 +97,6 @@ Input groups can contain observed and latent variables, with different priors on
101
97
#### Models implemented
102
98
103
99
* Linear-nonlinear and GP mappings
104
-
* RNNs
105
100
* LVMs
106
101
- Toroidal latent space priors ([Manifold GPLVM](https://arxiv.org/abs/2006.07429))
0 commit comments