dpca
An implementation of demixed Principal Component Analysis (a supervised linear dimensionality reduction technique)
Science Score: 20.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
✓Committers with academic emails
1 of 6 committers (16.7%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.6%) to scientific vocabulary
Keywords
Repository
An implementation of demixed Principal Component Analysis (a supervised linear dimensionality reduction technique)
Basic Info
- Host: GitHub
- Owner: machenslab
- License: mit
- Language: Jupyter Notebook
- Default Branch: master
- Size: 1.51 MB
Statistics
- Stars: 298
- Watchers: 25
- Forks: 96
- Open Issues: 9
- Releases: 0
Topics
Metadata Files
README.md
demixed Principal Component Analysis (dPCA)
dPCA is a linear dimensionality reduction technique that automatically discovers and highlights the essential features of complex population activities. The population activity is decomposed into a few demixed components that capture most of the variance in the data and that highlight the dynamic tuning of the population to various task parameters, such as stimuli, decisions, rewards, etc.
D Kobak+, W Brendel+, C Constantinidis, CE Feierstein, A Kepecs, ZF Mainen, X-L Qi, R Romo, N Uchida, CK Machens
Demixed principal component analysis of neural population data
eLife 2016, https://elifesciences.org/content/5/e10989
(arXiv link: http://arxiv.org/abs/1410.6031)
This repository provides easy to use Python and MATLAB implementations of dPCA as well as example code.
Use dPCA
Simple example code for surrogate data can be found in dpca_demo.ipynb and dpca_demo.m.
Python package
The Python package is tested against Python 2.7 and Python 3.4. To install, first make sure that numpy, cython, scipy, sklearn, itertools and numexpr are avaible. Then copy the files from the Python subfolder to a location in the Python search path.
Alternatively, from the terminal you can install the package by running:
$ cd /path/to/dPCA/python
$ python setup.py install
API of dPCA is similar to sklearn. To use dPCA, you should first import dPCA,
from dpca import dPCA
then initialize it,
dpca = dPCA(labels, n_components, regularizer)
then call the fitting function on your data to get the latent components Z,
Z = dpca.fit_transform(X).
The required initialization parameters are: - X - A multidimensional array containing the trial-averaged data. E.g. X[n,t,s,d] could correspond to the mean response of the n-th neuron at time t in trials with stimulus s and decision d. The observable (e.g. neuron index) needs to come first. - labels - Optional; list of characters with which to describe the parameter axes, e.g. 'tsd' to denote time, stimulus and decision axis. All marginalizations (e.g. time-stimulus) are refered to by subsets of those characters (e.g. 'ts'). - n_components - Dictionary or integer; if integer use the same number of components in each marginalization, otherwise every (key,value) pair refers to the number of components (value) in a marginalization (key).
More detailed documentation, and additional options, can be found in dpca.py.
MATLAB package
Add the Matlab subfolder to the Matlab search path.
Example code in dpca_demo.m generates surrogate data and provides a walkthrough for running PCA and dPCA analysis and plotting the results.
Support
Email wieland.brendel@bethgelab.org (Python) or dmitry.kobak@neuro.fchampalimaud.org (Matlab) with any questions.
Contributors
A big thanks for 3rd party contributions goes to cboulay.
Owner
- Name: Machens Lab
- Login: machenslab
- Kind: organization
- Repositories: 4
- Profile: https://github.com/machenslab
GitHub Events
Total
- Watch event: 19
- Fork event: 4
Last Year
- Watch event: 19
- Fork event: 4
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Wieland Brendel | w****l | 36 |
| Dmitry Kobak | d****k@n****g | 20 |
| Charles Guan | c****n@c****u | 5 |
| Chadwick Boulay | c****y@g****m | 5 |
| Wieland Brendel | w****l@t****) | 2 |
| Alex Williams | a****a@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 33
- Total pull requests: 12
- Average time to close issues: 6 months
- Average time to close pull requests: 23 days
- Total issue authors: 28
- Total pull request authors: 6
- Average comments per issue: 2.3
- Average comments per pull request: 2.5
- Merged pull requests: 9
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- nunocalaim (3)
- pkollias (2)
- ahwillia (2)
- cboulay (2)
- anandtrex (1)
- alexmaehon (1)
- edgarbc (1)
- ayan7926 (1)
- aboharbf (1)
- eduardosand (1)
- julianamengual (1)
- lwimala (1)
- charlesincharge (1)
- victoris93 (1)
- wielandbrendel (1)
Pull Request Authors
- cboulay (3)
- charlesincharge (3)
- ahwillia (2)
- wielandbrendel (2)
- vdplasthijs (1)
- wj2 (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 642 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 3
- Total maintainers: 1
pypi.org: dpca
Implements Demixed Principal Components Analysis
- Homepage: https://github.com/machenslab/dPCA/
- Documentation: https://dpca.readthedocs.io/
- License: MIT
-
Latest release: 1.0.5
published over 5 years ago
Rankings
Maintainers (1)
Dependencies
- numba *
- numexpr *
- numpy *
- scikit-learn *
- scipy *
- numba *
- numexpr *
- numpy *
- scipy *
- sklearn *