analysis:course-w16:week10

This shows you the differences between two versions of the page.

Both sides previous revision Previous revision Next revision | Previous revision | ||

analysis:course-w16:week10 [2016/02/15 10:18] mvdm [Estimating tuning curves] |
analysis:course-w16:week10 [2018/07/07 10:19] (current) |
||
---|---|---|---|

Line 266: | Line 266: | ||

In general, from the [[http://en.wikipedia.org/wiki/Poisson_distribution | definition of the Poisson distribution]], it follows that | In general, from the [[http://en.wikipedia.org/wiki/Poisson_distribution | definition of the Poisson distribution]], it follows that | ||

- | \[P(n_i|\mathbf{x}) = \frac{(\tau f_i(\mathbf{x}))^{n_i}}{n_i!} e^{-\tau f_i (x)}\] | + | \[P(n_i|\mathbf{x}) = \frac{(\tau f_i(\mathbf{x}))^{n_i}}{n_i!} e^{-\tau f_i (\mathbf{x})}\] |

$f_i(\mathbf{x})$ is the average firing rate of neuron $i$ over $x$ (i.e. the tuning curve for position), $n_i$ is the number of spikes emitted by neuron $i$ in the current time window, and $\tau$ is the size of the time window used. Thus, $\tau f_i(\mathbf{x})$ is the mean number of spikes we expect from neuron $i$ in a window of size $\tau$; the Poisson distribution describes how likely it is that we observe the actual number of spikes $n_i$ given this expectation. | $f_i(\mathbf{x})$ is the average firing rate of neuron $i$ over $x$ (i.e. the tuning curve for position), $n_i$ is the number of spikes emitted by neuron $i$ in the current time window, and $\tau$ is the size of the time window used. Thus, $\tau f_i(\mathbf{x})$ is the mean number of spikes we expect from neuron $i$ in a window of size $\tau$; the Poisson distribution describes how likely it is that we observe the actual number of spikes $n_i$ given this expectation. | ||

Line 275: | Line 275: | ||

\[P(\mathbf{n}|\mathbf{x}) = \prod_{i = 1}^{N} \frac{(\tau f_i(\mathbf{x}))^{n_i}}{n_i!} | \[P(\mathbf{n}|\mathbf{x}) = \prod_{i = 1}^{N} \frac{(\tau f_i(\mathbf{x}))^{n_i}}{n_i!} | ||

- | e^{-\tau f_i (x)}\] | + | e^{-\tau f_i (\mathbf{x})}\] |

An analogy here is simply to ask: if the probability of a coin coming up heads is $0.5$, what is the probability of two coints, flipped simultaneously, coming up heads? If the coins are independent then this is simply $0.5*0.5$. | An analogy here is simply to ask: if the probability of a coin coming up heads is $0.5$, what is the probability of two coints, flipped simultaneously, coming up heads? If the coins are independent then this is simply $0.5*0.5$. | ||

Line 481: | Line 481: | ||

% get trial id for each sample | % get trial id for each sample | ||

trial_id = zeros(size(Q_tvec_centers)); | trial_id = zeros(size(Q_tvec_centers)); | ||

- | trial_idx = nearest_idx3(run_start,Q_tvec_centers); % NOTE: on non-Windows, use nearest_idx.m | + | trial_idx = nearest_idx3(metadata.taskvars.trial_iv.tstart,Q_tvec_centers); % NOTE: on non-Windows, use nearest_idx.m |

trial_id(trial_idx) = 1; | trial_id(trial_idx) = 1; | ||

trial_id = cumsum(trial_id); | trial_id = cumsum(trial_id); | ||

Line 497: | Line 497: | ||

{{ :analysis:course-w16:dec_err.png?nolink&600 |}} | {{ :analysis:course-w16:dec_err.png?nolink&600 |}} | ||

+ | |||

+ | (Note, your plot might look a little different.) | ||

Thus, on average our estimate is 2.14 pixels away from the true position. Earlier laps seem to have some more outliers of bins where our estimate is bad (large distance) but there is no obvious trend across laps visible. | Thus, on average our estimate is 2.14 pixels away from the true position. Earlier laps seem to have some more outliers of bins where our estimate is bad (large distance) but there is no obvious trend across laps visible. |

analysis/course-w16/week10.1455549515.txt.gz ยท Last modified: 2018/07/07 10:19 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International