Giter VIP home page Giter VIP logo

neuroglm's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neuroglm's Issues

Missing files ? "buildGLM.buildModel" "fitGLM" and more ?

Have unsuccessfully tried to run tutorial.m, seemingly because it is unclear what fitGLM and buildGLM.buildModel resolve to.

Initial Point of Failure

neuroGLM/tutorial.m

Lines 120 to 130 in e603491

%{
%% Specify the model
hasBias = true;
model = buildGLM.buildModel(dspec, 'Poisson', 'exp', hasBias);
%% Do regression
[w, stats] = fitGLM(model, dm, y);
%}
%% Visualize fit
visualizeFit(w, model, dspec, vparam(1)); % ???

Line 130 references an unresolved model variable that seems to be set in the previously commented L121-L126.

Uncommenting the commented lines is also funky:

  1. buildGLM.buildModel does not exist
  2. fitGLM I assume should exist under buildGLM but it does not. Currently it conflicts with Matlab's inbuilt fitglm

Giving a quick look through the available source in this repo neuroGLM\matRegress\+glms\autoFitGLM.m is the closest to actually returning a model, but does not seem to match the function call in L130?

function model = autoFitGLM(X,Y, prspec, varargin)

Likely Further Points of Failures

neuroGLM/tutorial.m

Lines 136 to 141 in e603491

yPred = generatePrediction(w, model, dmTest);
ySamp = simulateModel(w, model, dmTest);
%% Validate model
gof = goodnessOfFit(w, stats, model, dmTest);
visualizeGoodnessOfFit(gof);

Afterwards I imagine generatePrediction, simulateModel, goodnessOfFit, visualizeGoodnessOfFit would also be unresolved as I cannot find anything with those names in the repo.


Am I missing something obvious? The docs/tutorial.md does seem to suggest another approach using the dm matrix that I can explore further, but I was expecting the tutorial to work in the first instance regardless.

neuroGLM/docs/tutorial.md

Lines 185 to 186 in e603491

# Regression analysis
Once you have designed your features, and obtained the design matrix, it's finally time to do some analysis!

Possibility to use this code for calcium imaging data

Hi,

I have been looking for models that allow to correlate neural activity to behavioral variables and found this repository.

As I see this only refers to spike train data, but do you think it is possible to use this code with calcium data? Would be previous spike deconvolution from the calcium imaging data necessary before using it? Thanks in advance and sorry for the very basic question.

Eduardo Maristany

marginalizing across spike histories

--- This is a question, not an issue ---

For evaluating the goodness-of-fit of the model, it is useful to generate predictions that MARGINALIZE over all possible spike histories. That is, having fit the model to an observed spike train, one wants to evaluate how well it can explain the data without using the observed spike train as the spike history of the model. Otherwise, things become a bit circular. Anyone written code for this? Thanks!

Rename 'master' branch to 'dev', and keep 'master' clean

At some point, we need to make sure 'master' branch contains a publicly usable code. All developments should be merging to the dev branch only.

Memming will announce a procedure to do this switch. This will require that everybody who cloned this repo needs to do a renaming as well.

What if my spiketrain or timing variables are empty for some trials.

Whats the advice if my spike train or timing variables are empty during some of the trials?

Sidenote:
To get my data accepted by the addTrial, function I added a condition to only test that the timing of events happen within the duration of the trial if the data input is nonempty. (The tests in line 18 and 28 does not work on empty vectors)

Then, when I compiled the SparseDesignMatrix it gave me a warning that the design matrix contains infs and nans. Could that be due to empty timing vectors?

Offset of spike train forced to 1

The function buildGLM.addCovariateSpiketrain might have a bug. It forces the offset to be 1 (line 11), disregarding the value in the basisStruct and without taking into account the unit of time or the bin size used.
For example, if the unit of time is set to be seconds, the offset will be forced to be 1 second.
Or, if another offset value has been set using basis functions, it will not be considered.

A solution to this issue could be:

% offset = 1; % Make sure to be causal. No instantaneous interaction allowed.
offset = basisStruct.param.nlOffset; 

Dealing with unstable neurons

Hi all,

This is not exactly a problem with the software, but rather a general analysis question.

In our acute recordings we often have drift that leads to units appearing and disappearing during a recording session. That means that there is a set of units that were recorded in all trials but also a set of units that have limited, not necessarily overlapping, "lifetimes".
How would I deal with these unstable neurons? I cannot simply leave the spike trains for these units empty outside their lifetimes, since the unit is not merely silent but is not recorded from.

As a side note: is this repo still being maintained or should I switch to pillowlab/GLMspiketools?

Thanks, Daniel

How to interpret filters

When I run the tutorial.m file the two spike filters 'hist' and 'coupling' both approach 0 towards long lags. If you interpret the filters as a kind of gain that would mean that 243 ms after a spike the spike rate goes down to 0. Does that make sense or should those filters be shifted by 1?
I have the same issue if I run the code on my data.

If you look at Park et al. 2014 the filters all seem to approach 1 instead. That seems to make more sense to me.

expt.binfun creates some trouble

Hi,

I am trying use this package on my data but for one trial I get an error due to the exp.binfun function.

It calculates the number of bins by dividing duration of trial with experiment binsize, and gives the right result compared to the number of samples in my behavior vector, for example, my vector is 251 elements, and duration/binSize = 251.00000... However, due to the ceil function it gets rounded up to 252 (The diff from 251 is 2.8422e-14).

I run into the same problem in line 14 of compileSparseDesignMatrix.

Is there any reason for using ceil instead of round?

Best regards, Eivind Hennestad

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.