• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

machenslab/dPCA: An implementation of demixed Principal Component Analysis (a su ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

machenslab/dPCA

开源软件地址(OpenSource Url):

https://github.com/machenslab/dPCA

开源编程语言(OpenSource Language):

Jupyter Notebook 68.5%

开源软件介绍(OpenSource Introduction):

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 [email protected] (Python) or [email protected] (Matlab) with any questions.

Contributors

A big thanks for 3rd party contributions goes to cboulay.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
mdqyy/MATLAB: Misc matlab scripts发布时间:2022-08-17
下一篇:
steven2358/sklearn-matlab: Machine learning in Matlab using scikit-learn syntax发布时间:2022-08-17
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap