This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
analysis:cosmo2014:module4 [2014/08/16 15:48] mvdm [Estimating movement kernels] |
analysis:cosmo2014:module4 [2018/07/07 10:19] (current) |
||
---|---|---|---|
Line 13: | Line 13: | ||
In the previous module, we applied the decoder to each time bin independently, using a flat spatial prior. In effect, this assumes that the place representation can move around arbitrarily from one time step to the next. Clearly, however, a rat cannot move around arbitrarily but instead moves subject to smoothness and continuity constraints! We can use this domain knowledge to improve the performance of our decoder. | In the previous module, we applied the decoder to each time bin independently, using a flat spatial prior. In effect, this assumes that the place representation can move around arbitrarily from one time step to the next. Clearly, however, a rat cannot move around arbitrarily but instead moves subject to smoothness and continuity constraints! We can use this domain knowledge to improve the performance of our decoder. | ||
- | Our approach will be similar to Kalman filtering, in that we can construct a model of the rat's movement. We can then use this model to generate a prediction of the rat's position ($P(\hat{\mathbf{x}}_t)|P(\hat{\mathbf{x}}_{t-1}))$) which can function as a prior in out Bayesian decoder. The hat is meant to indicate that these are all estimates, since the decoder does not have access to the rat's true position $x$. | + | Our approach will be similar to Kalman filtering, in that we can construct a model of the rat's movement. We can then use this model to generate a prediction of the rat's position ($P(\hat{\mathbf{x}}_t)|P(\hat{\mathbf{x}}_{t-1}))$) which can function as a prior in our Bayesian decoder. The hat is meant to indicate that these are all estimates, since the decoder does not have access to the rat's true position $x$. |
- | Do do this, first we need to estimate $P(\hat{\mathbf{x}}_t)|P(\hat{\mathbf{x}}_{t-1}))$ from the data. | + | To do this, first we need to estimate $P(\hat{\mathbf{x}}_t)|P(\hat{\mathbf{x}}_{t-1}))$ from the data. |
==== Estimating movement kernels ==== | ==== Estimating movement kernels ==== | ||
Line 268: | Line 268: | ||
Q_tsd = tsd(Q_tvec_centers,Q); | Q_tsd = tsd(Q_tvec_centers,Q); | ||
Q_tsd = restrict(Q_tsd,run_start,run_end); | Q_tsd = restrict(Q_tsd,run_start,run_end); | ||
+ | |||
+ | Q_tvec_centers = Q_tsd.tvec; | ||
+ | Q = Q_tsd.data; | ||
+ | nActiveNeurons = sum(Q > 0); | ||
</code> | </code> | ||
Line 273: | Line 277: | ||
<code matlab> | <code matlab> | ||
- | %% full 2-step version -- this fails because no reset | ||
p1 = nan(length(Q_tvec_centers),nBins); | p1 = nan(length(Q_tvec_centers),nBins); | ||
goodOccInd = find(occ_hist > 0); | goodOccInd = find(occ_hist > 0); |