improved indices

This commit is contained in:
2019-12-10 00:09:48 +01:00
parent bf52536b7b
commit c063cc9f0e
6 changed files with 175 additions and 164 deletions

View File

@@ -3,11 +3,12 @@
\chapter{Spiketrain analysis}
\exercisechapter{Spiketrain analysis}
\enterm[action potential]{Action potentials} (\enterm{spikes}) are
the carriers of information in the nervous system. Thereby it is the
time at which the spikes are generated that is of importance for
information transmission. The waveform of the action potential is
largely stereotyped and therefore does not carry information.
\entermde[action potential]{Aktionspotential}{Action potentials}
(\enterm[spike|seealso{action potential}]{spikes}) are the carriers of
information in the nervous system. Thereby it is the time at which the
spikes are generated that is of importance for information
transmission. The waveform of the action potential is largely
stereotyped and therefore does not carry information.
The result of the pre-processing of electrophysiological recordings are
series of spike times, which are termed \enterm{spiketrains}. If
@@ -15,8 +16,8 @@ measurements are repeated we get several \enterm{trials} of
spiketrains (\figref{rasterexamplesfig}).
Spiketrains are times of events, the action potentials. The analysis
of these leads into the realm of the so called \enterm[point
process]{point processes}.
of these leads into the realm of the so called \entermde[point
process]{Punktprozess}{point processes}.
\begin{figure}[ht]
\includegraphics[width=1\textwidth]{rasterexamples}
@@ -57,12 +58,13 @@ of these leads into the realm of the so called \enterm[point
$T_i=t_{i+1}-t_i$ and the number of events $n_i$. }
\end{figure}
A temporal \enterm{point process} is a stochastic process that
generates a sequence of events at times $\{t_i\}$, $t_i \in \reZ$. In
the neurosciences, the statistics of point processes is of importance
since the timing of neuronal events (action potentials, post-synaptic
potentials, events in EEG or local-field recordings, etc.) is crucial
for information transmission and can be treated as such a process.
A temporal \entermde{Punktprozess}{point process} is a stochastic
process that generates a sequence of events at times $\{t_i\}$, $t_i
\in \reZ$. In the neurosciences, the statistics of point processes is
of importance since the timing of neuronal events (action potentials,
post-synaptic potentials, events in EEG or local-field recordings,
etc.) is crucial for information transmission and can be treated as
such a process.
The events of a point process can be illustrated by means of a raster
plot in which each vertical line indicates the time of an event. The
@@ -76,7 +78,7 @@ number of observed events within a certain time window $n_i$
Implement a function \varcode{rasterplot()} that displays the times of
action potentials within the first \varcode{tmax} seconds in a raster
plot. The spike times (in seconds) recorded in the individual trials
are stored as vectors of times within a \codeterm{cell array}.
are stored as vectors of times within a cell array.
\end{exercise}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -84,9 +86,10 @@ number of observed events within a certain time window $n_i$
The intervals $T_i=t_{i+1}-t_i$ between successive events are real
positive numbers. In the context of action potentials they are
referred to as \enterm{interspike intervals}. The statistics of
interspike intervals are described using common measures for
describing the statistics of stochastic real-valued variables:
referred to as \entermde{Interspikeintervalle}{interspike
intervals}. The statistics of interspike intervals are described
using common measures for describing the statistics of stochastic
real-valued variables:
\begin{figure}[t]
\includegraphics[width=0.96\textwidth]{isihexamples}\vspace{-2ex}
@@ -110,9 +113,9 @@ describing the statistics of stochastic real-valued variables:
\frac{1}{n}\sum\limits_{i=1}^n T_i$.
\item Standard deviation of the interspike intervals: $\sigma_{ISI} = \sqrt{\langle (T - \langle T
\rangle)^2 \rangle}$\vspace{1ex}
\item \enterm[coefficient of variation]{Coefficient of variation}: $CV_{ISI} =
\frac{\sigma_{ISI}}{\mu_{ISI}}$.
\item \enterm[diffusion coefficient]{Diffusion coefficient}: $D_{ISI} =
\item \entermde[coefficient of variation]{Variationskoeffizient}{Coefficient of variation}:
$CV_{ISI} = \frac{\sigma_{ISI}}{\mu_{ISI}}$.
\item \entermde[diffusion coefficient]{Diffusionskoeffizient}{Diffusion coefficient}: $D_{ISI} =
\frac{\sigma_{ISI}^2}{2\mu_{ISI}^3}$.
\end{itemize}
@@ -133,12 +136,12 @@ describing the statistics of stochastic real-valued variables:
\end{exercise}
\subsection{Interval correlations}
So called \enterm{return maps} are used to illustrate
interdependencies between successive interspike intervals. The return
map plots the delayed interval $T_{i+k}$ against the interval
$T_i$. The parameter $k$ is called the \enterm{lag} $k$. Stationary
and non-stationary return maps are distinctly different
\figref{returnmapfig}.
So called \entermde[return map]{return map}{return maps} are used to
illustrate interdependencies between successive interspike
intervals. The return map plots the delayed interval $T_{i+k}$ against
the interval $T_i$. The parameter $k$ is called the \enterm{lag}
(\determ{Verz\"ogerung}) $k$. Stationary and non-stationary return
maps are distinctly different \figref{returnmapfig}.
\begin{figure}[t]
\includegraphics[width=1\textwidth]{returnmapexamples}
@@ -149,14 +152,16 @@ and non-stationary return maps are distinctly different
lower panels the serial correlations of successive intervals
separated by lag $k$. All the interspike intervals of the
stationary spike trains are independent of each other --- this is
a so called \enterm{renewal process}. In contrast, the ones of the
a so called \enterm{renewal process}
(\determ{Erneuerungsprozess}). In contrast, the ones of the
non-stationary spike trains show positive correlations that decay
for larger lags. The positive correlations in this example are
caused by a common stimulus that slowly increases and decreases
the mean firing rate of the spike trains.}
\end{figure}
Such dependencies can be further quantified using the \enterm{serial
Such dependencies can be further quantified using the
\entermde[correlation!serial]{Korrelation!serielle}{serial
correlations} \figref{returnmapfig}. The serial correlation is the
correlation coefficient of the intervals $T_i$ and the intervals
delayed by the lag $T_{i+k}$:
@@ -189,11 +194,11 @@ using the following measures:
\item Histogram of the counts $n_i$.
\item Average number of counts: $\mu_n = \langle n \rangle$.
\item Variance of counts: $\sigma_n^2 = \langle (n - \langle n \rangle)^2 \rangle$.
\item \determ{Fano Factor} (variance of counts divided by average count): $F = \frac{\sigma_n^2}{\mu_n}$.
\item \entermde{Fano Faktor}{Fano factor} (variance of counts divided by average count): $F = \frac{\sigma_n^2}{\mu_n}$.
\end{itemize}
Of particular interest is the average firing rate $r$ (spike count per
time interval , \determ{Feuerrate}) that is given in Hertz
\sindex[term]{firing rate!average rate}
Of particular interest is the \enterm[firing rate!average]{average
firing rate} $r$ (spike count per time interval, \determ{Feuerrate})
that is given in Hertz
\begin{equation}
\label{firingrate}
r = \frac{\langle n \rangle}{W} \; .
@@ -227,11 +232,12 @@ time interval , \determ{Feuerrate}) that is given in Hertz
The Gaussian distribution is, because of the central limit theorem,
the standard distribution for continuous measures. The equivalent in
the realm of point processes is the \enterm{Poisson distribution}.
the realm of point processes is the
\entermde[distribution!Poisson]{Verteilung!Poisson-}{Poisson distribution}.
In a \enterm[Poisson process!homogeneous]{homogeneous Poisson process}
the events occur at a fixed rate $\lambda=\text{const}$ and are
independent of both the time $t$ and occurrence of previous events
In a \entermde[Poisson process!homogeneous]{Poissonprozess!homogener}{homogeneous Poisson
process} the events occur at a fixed rate $\lambda=\text{const}$ and
are independent of both the time $t$ and occurrence of previous events
(\figref{hompoissonfig}). The probability of observing an event within
a small time window of width $\Delta t$ is given by
\begin{equation}
@@ -239,7 +245,7 @@ a small time window of width $\Delta t$ is given by
P = \lambda \cdot \Delta t \; .
\end{equation}
In an \enterm[Poisson process!inhomogeneous]{inhomogeneous Poisson
In an \entermde[Poisson process!inhomogeneous]{Poissonprozess!inhomogener}{inhomogeneous Poisson
process}, however, the rate $\lambda$ depends on time: $\lambda =
\lambda(t)$.
@@ -281,7 +287,7 @@ The homogeneous Poisson process has the following properties:
\item Thus, the coefficient of variation is always $CV_{ISI} = 1$ .
\item The serial correlation is $\rho_k =0$ for $k>0$, since the
occurrence of an event is independent of all previous events. Such a
process is also called a \enterm{renewal process}.
process is also called a \enterm{renewal process} (\determ{Erneuerungsprozess}).
\item The number of events $k$ within a temporal window of duration
$W$ is Poisson distributed:
\begin{equation}
@@ -356,10 +362,9 @@ closely.
\end{figure}
A very simple method for estimating the time-dependent firing rate is
the \enterm[firing rate!instantaneous]{instantaneous firing rate}. The
firing rate can be directly estimated as the inverse of the time
between successive spikes, the interspike-interval
(\figref{instratefig}).
the \entermde[firing rate!instantaneous]{Feuerrate!instantane}{instantaneous firing rate}.
The firing rate can be directly estimated as the inverse of the time
between successive spikes, the interspike-interval (\figref{instratefig}).
\begin{equation}
\label{instantaneousrateeqn}
@@ -384,12 +389,12 @@ not fire an action potential for a long time.
\subsection{Peri-stimulus-time-histogram}
While the \emph{instantaneous firing rate} uses the interspike
interval, the \enterm{peri stimulus time histogram} (PSTH) uses the
spike count within observation windows of the duration $W$. It
While the instantaneous firing rate is based on the interspike
intervals, the \enterm{peri stimulus time histogram} (PSTH) is based on
spike counts within observation windows of the duration $W$. It
estimates the probability of observing a spike within that observation
time. It tries to estimat the average rate in the limit of small
obersvation times \eqnref{psthrate}:
time. It tries to estimate the average rate in the limit of small
obersvation times:
\begin{equation}
\label{psthrate}
r(t) = \lim_{W \to 0} \frac{\langle n \rangle}{W} \; ,
@@ -399,10 +404,11 @@ potentials observed within the interval $(t, t+W)$. Such description
matches the time-dependent firing rate $\lambda(t)$ of an
inhomogeneous Poisson process.
The firing probability can be estimated using the \emph{binning
method} or by using \emph{kernel density estimations}. Both methods
make an assumption about the relevant observation time-scale ($W$ in
\eqnref{psthrate}).
The firing probability can be estimated using the \enterm[firing
rate!binning method]{binning method} or by using \enterm[firing
rate!kernel density estimation]{kernel density estimations}. Both
methods make an assumption about the relevant observation time-scale
($W$ in \eqnref{psthrate}).
\subsubsection{Binning-method}
@@ -416,14 +422,15 @@ make an assumption about the relevant observation time-scale ($W$ in
binwidth.}\label{binpsthfig}
\end{figure}
The binning method separates the time axis into regular bins of the
bin width $W$ and counts for each bin the number of observed action
potentials (\figref{binpsthfig} top). The resulting histogram is then
normalized with the bin width $W$ to yield the firing rate shown in
the bottom trace of figure \ref{binpsthfig}. The above sketched
process is equivalent to estimating the probability density. It is
possible to estimate the PSTH using the \code{hist()} function
\sindex[term]{Feuerrate!Binningmethode}
The \entermde[firing rate!binning
method]{Feuerrate!Binningmethode}{binning method} separates the time
axis into regular bins of the bin width $W$ and counts for each bin
the number of observed action potentials (\figref{binpsthfig}
top). The resulting histogram is then normalized with the bin width
$W$ to yield the firing rate shown in the bottom trace of figure
\ref{binpsthfig}. The above sketched process is equivalent to
estimating the probability density. For computing a PSTH the
\code{hist()} function can be used.
The estimated firing rate is valid for the total duration of each
bin. This leads to the step-like plot shown in
@@ -436,7 +443,7 @@ time-scale.
\pagebreak[4]
\begin{exercise}{binnedRate.m}{}
Implement a function that estimates the firing rate using the
``binning method''. The method should take the spike-times as an
binning method. The method should take the spike-times as an
input argument and returns the firing rate. Plot the PSTH.
\end{exercise}
@@ -453,20 +460,22 @@ time-scale.
superposition of the kernels.}\label{convratefig}
\end{figure}
With the convolution method we avoid the sharp edges of the binning
method. The spiketrain is convolved with a \enterm{convolution
kernel}. Technically speaking we need to first create a binary
representation of the spike train. This binary representation is a
series of zeros and ones in which the ones denote the spike. Then this binary vector is convolved with a kernel of a certain width:
With the \entermde[firing rate!convolution
method]{Feuerrate!Faltungsmethode}{convolution method} we avoid the
sharp edges of the binning method. The spiketrain is convolved with a
\entermde{Faltungskern}{convolution kernel}. Technically speaking we
need to first create a binary representation of the spike train. This
binary representation is a series of zeros and ones in which the ones
denote the spike. Then this binary vector is convolved with a kernel
of a certain width:
\[r(t) = \int_{-\infty}^{\infty} \omega(\tau) \, \rho(t-\tau) \, {\rm d}\tau \; , \]
where $\omega(\tau)$ represents the kernel and $\rho(t)$ the binary
representation of the response. The process of convolution can be
imagined as replacing each event of the spiketrain with the kernel
(figure \ref{convratefig} top). The superposition of the replaced
kernels is then the firing rate (if the kerel is correctly normalized
kernels is then the firing rate (if the kernel is correctly normalized
to an integral of one, figure \ref{convratefig}
bottom). \sindex[term]{Feuerrate!Faltungsmethode}
bottom).
In contrast to the other methods the convolution methods leads to a
continuous function which is often desirable (in particular when
@@ -489,8 +498,9 @@ relevate time-scale.
The graphical representation of the neuronal activity alone is not
sufficient tot investigate the relation between the neuronal response
and a stimulus. One method to do this is the \enterm[STA|see
spike-triggered average]{spike-triggered average}. The STA
and a stimulus. One method to do this is the \entermde{Spike-triggered
Average}{spike-triggered average}, \enterm[STA|see{spike-triggered
average}]{STA}. The STA
\begin{equation}
STA(\tau) = \langle s(t - \tau) \rangle = \frac{1}{N} \sum_{i=1}^{N} s(t_i - \tau)
\end{equation}
@@ -504,9 +514,9 @@ snippets are then averaged (\figref{stafig}).
\includegraphics[width=\columnwidth]{sta}
\titlecaption{Spike-triggered average of a P-type electroreceptors
and the stimulus reconstruction.}{The neuron was driven by a
``white-noise'' stimulus (blue curve, right panel). The STA (left)
is the average stimulus that surrounds the times of the recorded
action potentials (40\,ms before and 20\,ms after the
\enterm{white-noise} stimulus (blue curve, right panel). The STA
(left) is the average stimulus that surrounds the times of the
recorded action potentials (40\,ms before and 20\,ms after the
spike). Using the STA as a convolution kernel for convolving the
spiketrain we can reconstruct the stimulus from the neuronal
response. In this way we can get an impression of the stimulus