%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{\tr{Point processes}{Punktprozesse}}

\begin{figure}[t]
  \texpicture{pointprocessscetchB}
  \caption{\label{pointprocessscetchfig}Ein Punktprozess ist eine
    Abfolge von Zeitpunkten $t_i$ die auch durch die Intervalle
    $T_i=t_{i+1}-t_i$ oder die Anzahl der Ereignisse $n_i$ beschrieben
    werden kann. }
\end{figure}

Ein zeitlicher Punktprozess ist ein stochastischer Prozess der eine Abfolge von Ereignissen zu den Zeiten $\{t_i\}$, $t_i \in \reZ$ generiert.

Jeder Punktprozess wird durch einen sich in der Zeit kontinuierlichen
entwickelnden Prozess generiert. Wann immer dieser Prozess eine Schwelle \"uberschreitet
wird ein Ereigniss des Punktprozesses erzeugt. Zum Beispiel:
\begin{itemize}
\item Aktionspotentiale/Herzschlag: wird durch die Dynamik des
  Membranpotentials eines Neurons/Herzzelle erzeugt.
\item Erdbeben: wird durch die Dynamik des Druckes zwischen
  tektonischen Platten auf beiden Seiten einer geologischen Verwerfung
  erzeugt.
\item Zeitpunkt eines Grillen/Frosch/Vogelgesangs: wird durch die
  Dynamic des Nervensystems und des Muskelapparates erzeugt.
\end{itemize}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\section{Rate eines Punktprozesses}
Rate of events $r$ (``spikes per time'') measured in Hertz.
\begin{itemize}
\item Number of events $N$ per observation time $W$: $r = \frac{N}{W}$
\item Without boundary effects: $r = \frac{N-1}{t_N-t_1}$
\item Inverse interval: $r = \frac{1}{\mu_{ISI}}$
\end{itemize}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\section{Intervall Statistiken}

\begin{figure}[t]
  \includegraphics[width=0.45\textwidth]{poissonisih100hz}\hfill
  \includegraphics[width=0.45\textwidth]{lifisih16}
  \caption{\label{isihfig}Interspike-Intervall Histogramme von einem Poisson Prozess (links)
    und einem Integrate-and-Fire Neuron (rechts).}
\end{figure}

\subsection{First order (Interspike) interval statistics}
\begin{itemize}
\item Histogram $p(T)$ of intervals $T$. Normalized to $\int_0^{\infty} p(T) \; dT = 1$
\item Mean interval $\mu_{ISI} = \langle T \rangle = \frac{1}{n}\sum\limits_{i=1}^n T_i$
\item Variance of intervals $\sigma_{ISI}^2 = \langle (T - \langle T \rangle)^2 \rangle$\vspace{1ex}
\item Coefficient of variation $CV_{ISI} = \frac{\sigma_{ISI}}{\mu_{ISI}}$
\item Diffusion coefficient $D_{ISI} = \frac{\sigma_{ISI}^2}{2\mu_{ISI}^3}$
\end{itemize}

\subsection{Interval return maps}
Scatter plot between succeeding intervals separated by lag $k$.

\begin{figure}[t]
  \begin{minipage}[t]{0.49\textwidth}
    LIF $I=10$, $\tau_{adapt}=100$\,ms:\\
    \includegraphics[width=1\textwidth]{lifadaptreturnmap10-100ms}
  \end{minipage}
  \hfill
  \begin{minipage}[t]{0.49\textwidth}
    LIF $I=15.7$, $\tau_{OU}=100$\,ms:\\
    \includegraphics[width=1\textwidth]{lifoureturnmap16-100ms}
  \end{minipage}
  \caption{\label{returnmapfig}Interspike-Intervall return maps.}
\end{figure}

\subsection{Serial correlations of the intervals}
Correlation coefficients between succeeding intervals separated by lag $k$:
\[ \rho_k = \frac{\langle (T_{i+k} - \langle T \rangle)(T_i - \langle T \rangle) \rangle}{\langle (T_i - \langle T \rangle)^2\rangle} = \frac{{\rm cov}(T_{i+k}, T_i)}{{\rm var}(T_i)} \]
$\rho_0=1$ (correlation of each interval with itself).

\begin{figure}[t]
  \begin{minipage}[t]{0.49\textwidth}
    LIF $I=10$, $\tau_{adapt}=100$\,ms:\\
    \includegraphics[width=1\textwidth]{lifadaptserial10-100ms}
  \end{minipage}
  \hfill
  \begin{minipage}[t]{0.49\textwidth}
    LIF $I=15.7$, $\tau_{OU}=100$\,ms:\\
    \includegraphics[width=1\textwidth]{lifouserial16-100ms}
  \end{minipage}
  \caption{\label{serialcorrfig}Serial correlations.}
\end{figure}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Count statistics}

\begin{figure}[t]
  \includegraphics[width=0.48\textwidth]{poissoncounthist100hz10ms}\hfill
  \includegraphics[width=0.48\textwidth]{poissoncounthist100hz100ms}
  \caption{\label{countstatsfig}Count Statistik.}
\end{figure}

Histogram of number of events $N$ (counts) within observation window of duration $W$.

\subsection{Fano factor}

\begin{figure}[t]
  \begin{minipage}[t]{0.49\textwidth}
    Poisson process $\lambda=100$\,Hz:\\
    \includegraphics[width=1\textwidth]{poissonfano100hz}
  \end{minipage}
  \hfill
  \begin{minipage}[t]{0.49\textwidth}
    LIF $I=10$, $\tau_{adapt}=100$\,ms:\\
    \includegraphics[width=1\textwidth]{lifadaptfano10-100ms}
  \end{minipage}
  \caption{\label{fanofig}Fano factor.}
\end{figure}

Statistics of number of events $N$ within observation window of duration $W$.
\begin{itemize}
\item Mean count: $\mu_N = \langle N \rangle$
\item Count variance: $\sigma_N^2 = \langle (N - \langle N \rangle)^2 \rangle$
\item Fano factor (variance divided by mean): $F = \frac{\sigma_N^2}{\mu_N}$
\end{itemize}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\tr{Homogeneous Poisson process}{Homogener Poisson Prozess}}

\begin{figure}[t]
  \includegraphics[width=1\textwidth]{poissonraster100hz}
  \caption{\label{hompoissonfig}Rasterplot von Poisson-Spikes.}
\end{figure}

The probability $p(t)\delta t$ of an event occuring at time $t$
is independent of $t$ and independent of any previous event
(independent of event history).

The probability $P$ for an event occuring within a time bin of width $\Delta t$
is
\[ P=\lambda \cdot \Delta t \]
for a Poisson process with rate $\lambda$.

\subsection{Statistics of homogeneous Poisson process}

\begin{figure}[t]
  \includegraphics[width=0.45\textwidth]{poissonisihexp20hz}\hfill
  \includegraphics[width=0.45\textwidth]{poissonisihexp100hz}
  \caption{\label{hompoissonisihfig}Interspike interval histograms of poisson spike train.}
\end{figure}

\begin{itemize}
\item Exponential distribution of intervals $T$: $p(T) = \lambda e^{-\lambda T}$
\item Mean interval $\mu_{ISI} = \frac{1}{\lambda}$
\item Variance of intervals $\sigma_{ISI}^2 = \frac{1}{\lambda^2}$
\item Coefficient of variation $CV_{ISI} = 1$
\item Serial correlation $\rho_k =0$ for $k>0$ (renewal process!)   
\item Fano factor $F=1$
\end{itemize}

\subsection{Count statistics of Poisson process}

\begin{figure}[t]
  \includegraphics[width=0.48\textwidth]{poissoncounthistdist100hz10ms}\hfill
  \includegraphics[width=0.48\textwidth]{poissoncounthistdist100hz100ms}
  \caption{\label{hompoissoncountfig}Count statistics of poisson spike train.}
\end{figure}

Poisson distribution:
\[ P(k) = \frac{(\lambda W)^ke^{\lambda W}}{k!} \]