Skip to content

Python code for Sparse Variational Gaussian Process Factor Analysis (Duncker and Sahani, 2018)

License

Notifications You must be signed in to change notification settings

joacorapela/svGPFA

Repository files navigation

Python implementation of Sparse Variational Gaussian Process Factor Analysis (svGPFA, Duncker and Sahani, 2018) tests docs

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.

Examples and Documentation

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.

Installation

We recommend installing svGPFA in a Python virtual environment.

  1. clone this repo

  2. change the current directory to that of the cloned repo

    cd svGPFA
    
  3. 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]
    

Testing the installation

  1. From the root directory of the cloned svGPFA directory, change the current directory to examples/scripts.

    cd examples/scripts
    
  2. run the estimation of svGPFA parameters (for only two EM iterations)

    python doEstimateSVGPFA.py --em_max_iter=2
    
  3. 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
    

Citing us

If you use svGPFA, please cite the following paper:

Lea Duncker and Maneesh Sahani (2018). Temporal alignment and latent Gaussian process factor inference in population spike trains. 32nd Conference on Neural Information Processing Systems, Montréal, Canada

@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}
}

Development team

  • Joaquin Rapela (Gatsby Computational Neuroscience Unit, University College London)

  • Maneesh Sahani (Gatsby Computational Neuroscience Unit, University College London)

Acknowledgements

The research and development for svGPFA is supported by funding from the Gatsby Charitable Foundation.

About

Python code for Sparse Variational Gaussian Process Factor Analysis (Duncker and Sahani, 2018)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages