Eden-Kramer-Lab / replay_trajectory_classification

State space models for decoding hippocampal trajectories and determining their type using sorted or clusterless data
MIT License
44 stars 16 forks source link

How to decode with speed #32

Closed samdeoxys1 closed 1 month ago

samdeoxys1 commented 7 months ago

If I want to use speed instead of spike to do decoding / classification, which model should I use? I saw that there is a calcium likelihood with gamma distribution, but I don't know which decoder/classifier class to use, since they accept either SortedSpikes or Clusterless, but not calcium?

I'm using 1.3.15

Thanks!

edeno commented 7 months ago

I think the Gamma distribution is your best bet. It is particularly good for distributions that are skewed and bounded by zero which speed fulfills. This part of the code is pretty untested though so there might have to be some tweaking. A log normal distribution would also be appropriate.

samdeoxys1 commented 6 months ago

Could you point me to where I should change in the code and what need to be changed? I used to mostly use SortedSpikesClassifier or SotedSpikesDecoder. Thanks!

edeno commented 6 months ago

Well, it's not going to correspond to either of those, because they are more or less defined by the input data type (sorted spikes, which is treating things as a point process).

You'd have to define a new class using the likelihood function corresponding to the gamma distribution. It's not implemented yet basically.