Python implementation of Sparse Variational Gaussian Process Factor Analysis (svGPFA, Duncker and Sahani, 2018)
svGPFA identifies common latent structure in neural population spike-trains. It uses shared latent Gaussian processes, which are combined linearly as in Gaussian Process Factor Analysis (GPFA, Yu et al., 2009). svGPFA extends GPFA to handle unbinned spike-train data by using a continuous time point-process likelihood model and achieving scalability using a sparse variational approximation.
You can run svGPFA on sample data, plot its estimates and perform goodness-of-fit tests (without installing anything in your computer) by just running this Google Colab notebook. You can also do this by installing svGPFA (instructions below) and running this Jupyter notebook. In addition, after installing svGPFA, you can estimate models using a script, as shown in section Testing the installation below. Examples running svGPFA on different dataset are provided in this gallery.
Documentation can be found here.
We recommend installing svGPFA in a Python virtual environment.
-
clone this repo
-
change the current directory to that of the cloned repo
cd svGPFA
-
if you will not run the example notebooks (see above), in the root directory of the cloned repo type
pip install -e .
If you will run the example notebooks (see above), in the root directory of the cloned repo type
pip install -e .[notebook]
-
From the root directory of the cloned svGPFA directory, change the current directory to examples/scripts.
cd examples/scripts
-
run the estimation of svGPFA parameters (for only two EM iterations)
python doEstimateSVGPFA.py --em_max_iter=2
-
if everything went well the previous script should terminate after showing the following line in the standard output:
Saved results to results/xxxxxxxx_etimationRes.pickle
If you use svGPFA, please cite the following paper:
@article{duncker2018temporal,
title={Temporal alignment and latent Gaussian process factor inference in population spike trains},
author={Duncker, Lea and Sahani, Maneesh},
journal={Advances in neural information processing systems},
volume={31},
year={2018}
}
-
Joaquin Rapela (Gatsby Computational Neuroscience Unit, University College London)
-
Maneesh Sahani (Gatsby Computational Neuroscience Unit, University College London)
The research and development for svGPFA is supported by funding from the Gatsby Charitable Foundation.