[pointprocesses] improved spike count and fano factor exercises

This commit is contained in:
2021-01-18 23:03:30 +01:00
parent 753d756409
commit 7ec4cddd62
14 changed files with 109 additions and 220 deletions

View File

@@ -239,19 +239,18 @@ describing univariate data sets of real numbers:
\begin{exercise}{isihist.m}{}
Implement a function \varcode{isihist()} that calculates the
normalized interspike interval histogram. The function should take
two input arguments; (i) a vector of interspike intervals and (ii)
the width of the bins used for the histogram. It returns the
normalized interspike interval histogram. The function should take a
vector of interspike intervals and the width of the bins to be used
for the histogram as input arguments. The function returns the
probability density as well as the centers of the bins.
\end{exercise}
\begin{exercise}{plotisihist.m}{}
Implement a function that takes the returned values of
\varcode{isihist()} as input arguments and then plots the data. The
plot should show the histogram with the x-axis scaled to
milliseconds and should be annotated with the average ISI, the
standard deviation, and the coefficient of variation of the ISIs
(\figref{isihexamplesfig}).
Implement a function that uses the \varcode{isihist()} function from
the previous exercise to plot an ISI histogram. The plot shows the
histogram with the x-axis scaled to milliseconds, annotated with the
average ISI, the standard deviation, and the coefficient of
variation of the ISIs (\figref{isihexamplesfig}).
\end{exercise}
\subsection{Interval correlations}
@@ -332,8 +331,8 @@ characterized by the non-zero serial correlations
\begin{exercise}{isiserialcorr.m}{}
Implement a function \varcode{isiserialcorr()} that takes a vector
of interspike intervals as input argument and calculates the serial
correlations up to some maximum lag.
of interspike intervals as input and computes serial correlations up
to some maximum lag.
\end{exercise}
\begin{exercise}{plotisiserialcorr.m}{}
@@ -398,27 +397,10 @@ Because spike counts are unitless and positive numbers the
\end{equation}
is a commonly used measure for quantifying the variability of event
counts relative to the mean number of events. In particular for
homogeneous Poisson processes the Fano factor equals one,
independently of the time window $W$.
homogeneous Poisson processes the Fano factor equals exactly one and
is independent of the time window $W$.
\end{itemize}
Note that all of these statistics depend in general on the chosen
window length $W$. The average spike count, for example, grows
linearly with $W$ for sufficiently large time windows: $\langle n
\rangle = r W$, \eqnref{firingrate}. Doubling the counting window
doubles the spike count. As does the spike-count variance
(\figref{fanofig}). At smaller time windows the statistics of the
event counts might depend on the particular duration of the counting
window. There might be an optimal time window for which the variance
of the spike count is minimal. The Fano factor plotted as a function
of the time window illustrates such properties of point processes
(\figref{fanofig}).
This also has consequences for information transmission in neural
systems. The lower the variance in spike count relative to the
averaged count, the higher the signal-to-noise ratio at which
information encoded in the mean spike count is transmitted.
\begin{figure}[t]
\includegraphics{fanoexamples}
\titlecaption{\label{fanofig} Fano factor.}{Counting events in time
@@ -435,13 +417,52 @@ information encoded in the mean spike count is transmitted.
interspike intervals (right).}
\end{figure}
\begin{exercise}{counthist.m}{}
Implement a function \varcode{counthist()} that calculates and plots
the distribution of spike counts observed in a certain time
window. The function should take two input arguments: a cell-array
of vectors containing the spike times in seconds observed in a
number of trials, and the duration of the time window that is used
to evaluate the counts.
Note that all of these statistics depend in general on the chosen
window length $W$ used for counting the events. The average spike
count, for example, grows linearly with $W$ for sufficiently large
time windows: $\langle n \rangle = r W$, \eqnref{firingrate}. Doubling
the counting window doubles the spike count. As does the spike-count
variance (\figref{fanofig}). At smaller time windows the statistics of
the event counts might depend on the particular duration of the
counting window. There could be an optimal time window for which the
variance of the spike count is minimal. The Fano factor plotted as a
function of the time window illustrates such properties of point
processes in a single graph (\figref{fanofig}).
This also has consequences for information transmission in neural
systems. The membrane time constant of a post-synaptic neuron defines
a counting window. If input spikes arrive within about one time
constant they are added up. The lower the variance in spike count
relative to the averaged count, the higher the signal-to-noise ratio
at which information encoded in the mean spike count is
transmitted. If the membrane time constant of the target neuron
matches the counting window where the Fano factor is minimal, then
information is potentially transmitted at the highest possible
signal-to-noise ratio. For this reason, the Fano factor is used in the
Neurosciences to quantify and analyze reliability of neuronal
responses.
\begin{exercise}{counts.m}{}
Write a function \varcode{counts()} that counts the number of spikes
in windows of given duration and returns the counts in a single
vector. Spike times are passed as a cell-array of vectors,
containing the spike times in seconds observed in a number of
trials, to the function.
\end{exercise}
\begin{exercise}{plotcounthist.m}{}
Write a function that takes a cell-array with spike times as input
and plots a normalized histogram of the spike counts counted in
windows of a given duration.
\end{exercise}
\begin{exercise}{plotfanofactor.m}{}
Write a function that takes a cell-array with spike times as input
and plots in one plot count variances a function of the
corresponding mean counts and in a second plot the Fano factor as a
function of the duration of the count window in logarithmic
scale. Two arguments of the function take the minimum and maximum
duration of the count window.
\end{exercise}