Skip to content

freeman-lab/cascade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cascade

Library for fitting neural encoding models

About

Imagine we measures the response of a neuron to several simultaneous stimulus and behavioral variables. This toolbox fits a family of cascade models with both linear and nonlinear stages, including NL, LN, and NLN, using maximum likelihood.

Use

The fitting routines require an input structure d, which contains at the minimum, the following fields:

t - time points per trial
k - number of trials (can be 1 if no trial structure)
u - upsampling factor for stimulus
c - number of stimuli (or behavioral variables)
samp - temporal sampling of stimulus / response ('same" or 'up')
S_ctk - matrix of stimuli / behaviors x time points x trials
R_ntk - matrix neurons x time points x trials

Fits are generated by calling:

fit = fitInit(d,'NL','loglik',20);
d = prepareStim(d,fit);
[train test] = prepareRoi(d,fit,1);
fit = fitDo(train,test,fit);

To-Do

incorporate an output nonlinearity (fitG)

About

Library for fitting nonlinear neural encoding models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages