====== Differences ====== 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/14 01:09] mvdm |
analysis:cosmo2014:module4 [2018/04/17 15:20] (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 91: | Line 91: | ||
| {{ :analysis:cosmo2014:2d_deltaspace_fine.png?600 |}} | {{ :analysis:cosmo2014:2d_deltaspace_fine.png?600 |}} | ||
| - | This shows an overall tendency for the rat to travel right, and to a lesser extent up ad down, which makes sense given the shape of the maze. | + | This shows an overall tendency for the rat to travel right, and to a lesser extent up and down, which makes sense given the shape of the maze and the fact that the rat starts on the left side of the central stem. |
| Let's construct the same at the same spatial resolution as our tuning curves: | Let's construct the same at the same spatial resolution as our tuning curves: | ||
| 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); | ||