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<sup>+</sup>, W Brendel<sup>+</sup>, C Constantinidis, CE Feierstein,
A Kepecs, ZF Mainen, X-L Qi, R Romo, N Uchida, CK Machens<br>
> **Demixed principal component analysis of neural population data**<br>
> eLife 2016, https://elifesciences.org/content/5/e10989<br>
> (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**](http://nbviewer.ipython.org/github/wielandbrendel/dPCA/blob/master/python/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 [email protected] (Python) or [email protected] (Matlab) with any questions.
### Contributors
A big thanks for 3rd party contributions goes to **cboulay**.
没有合适的资源?快使用搜索试试~ 我知道了~
An implementation of demixed Principal Component Analysis
共27个文件
m:15个
py:4个
yml:2个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 87 浏览量
2023-07-21
20:22:45
上传
评论
收藏 282KB ZIP 举报
温馨提示
An implementation of demixed Principal Component Analysis (a supervised linear dimensionality reduction technique).zip
资源推荐
资源详情
资源评论
收起资源包目录
An implementation of demixed Principal Component Analysis (a supervised linear dimensionality reduction technique).zip (27个子文件)
新建文件夹
dPCA-master
.travis.yml 973B
.github
workflows
uploadpypy.yml 651B
matlab
dpca_pinv.m 3KB
dpca_classificationPlot.m 5KB
dpca_marginalize.m 9KB
dpca_signifComponents.m 2KB
dpca_getTestTrials.m 2KB
dpca_optimizeLambda.m 11KB
dpca_perMarginalization.m 5KB
dpca_plot.m 16KB
dpca_plot_default.m 4KB
dpca_classificationAccuracy.m 11KB
dpca_classificationShuffled.m 8KB
dpca_demo.m 10KB
dpca.m 7KB
dpca_getNoiseCovariance.m 2KB
dpca_explainedVariance.m 8KB
python
setup.py 1KB
dPCA_demo.ipynb 309KB
README.rst 2KB
requirements.txt 39B
dPCA
utils.py 1KB
__init__.py 0B
dPCA.py 40KB
.gitignore 96B
README.md 3KB
License.md 1KB
共 27 条
- 1
资源评论
AbelZ_01
- 粉丝: 893
- 资源: 5441
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功