New design pattern chapter.
Next exercises for point processes.
This commit is contained in:
		
							parent
							
								
									0be73cce5c
								
							
						
					
					
						commit
						4bb0c77ac4
					
				
							
								
								
									
										29
									
								
								designpattern/lecture/Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								designpattern/lecture/Makefile
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,29 @@ | |||||||
|  | BASENAME=designpattern | ||||||
|  | 
 | ||||||
|  | PYFILES=$(wildcard *.py) | ||||||
|  | PYPDFFILES=$(PYFILES:.py=.pdf) | ||||||
|  | 
 | ||||||
|  | all : pdf  | ||||||
|  | 
 | ||||||
|  | # script:
 | ||||||
|  | pdf : $(BASENAME)-chapter.pdf | ||||||
|  | 
 | ||||||
|  | $(BASENAME)-chapter.pdf : $(BASENAME)-chapter.tex $(BASENAME).tex $(PYPDFFILES) | ||||||
|  | 	pdflatex -interaction=scrollmode $< | tee /dev/stderr | fgrep -q "Rerun to get cross-references right" && pdflatex -interaction=scrollmode $< || true | ||||||
|  | 
 | ||||||
|  | $(PYPDFFILES) : %.pdf : %.py | ||||||
|  | 	python $< | ||||||
|  | 
 | ||||||
|  | clean : | ||||||
|  | 	rm -f *~  | ||||||
|  | 	rm -f $(BASENAME).aux $(BASENAME).log | ||||||
|  | 	rm -f $(BASENAME)-chapter.aux $(BASENAME)-chapter.log $(BASENAME)-chapter.out | ||||||
|  | 	rm -f $(PYPDFFILES) $(GPTTEXFILES) | ||||||
|  | 
 | ||||||
|  | cleanall : clean | ||||||
|  | 	rm -f $(BASENAME)-chapter.pdf | ||||||
|  | 
 | ||||||
|  | watchpdf : | ||||||
|  | 	while true; do ! make -q pdf && make pdf; sleep 0.5; done | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
							
								
								
									
										225
									
								
								designpattern/lecture/designpattern-chapter.tex
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										225
									
								
								designpattern/lecture/designpattern-chapter.tex
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,225 @@ | |||||||
|  | \documentclass[12pt]{report} | ||||||
|  | 
 | ||||||
|  | %%%%% title %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | \title{\tr{Introduction to Scientific Computing}{Einf\"uhrung in die wissenschaftliche Datenverarbeitung}} | ||||||
|  | \author{Jan Grewe \& Jan Benda\\Abteilung Neuroethologie\\[2ex]\includegraphics[width=0.3\textwidth]{UT_WBMW_Rot_RGB}} | ||||||
|  | \date{WS 15/16} | ||||||
|  | 
 | ||||||
|  | %%%% language %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | % \newcommand{\tr}[2]{#1}  % en | ||||||
|  | % \usepackage[english]{babel} | ||||||
|  | \newcommand{\tr}[2]{#2}  % de | ||||||
|  | \usepackage[german]{babel} | ||||||
|  | 
 | ||||||
|  | %%%%% packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | \usepackage{pslatex}   % nice font for pdf file | ||||||
|  | \usepackage[breaklinks=true,bookmarks=true,bookmarksopen=true,pdfpagemode=UseNone,pdfstartview=FitH,colorlinks=true,citecolor=blue]{hyperref} | ||||||
|  | 
 | ||||||
|  | %%%% layout %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | \usepackage[left=25mm,right=25mm,top=20mm,bottom=30mm]{geometry} | ||||||
|  | \setcounter{tocdepth}{1} | ||||||
|  | 
 | ||||||
|  | %%%%% section style %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | \usepackage[sf,bf,it,big,clearempty]{titlesec} | ||||||
|  | \setcounter{secnumdepth}{1} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | %%%%% units %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | \usepackage[mediumspace,mediumqspace,Gray]{SIunits}      % \ohm, \micro | ||||||
|  |   | ||||||
|  | 
 | ||||||
|  | %%%%% figures %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | \usepackage{graphicx} | ||||||
|  | \usepackage{xcolor} | ||||||
|  | \pagecolor{white} | ||||||
|  | 
 | ||||||
|  | \newcommand{\ruler}{\par\noindent\setlength{\unitlength}{1mm}\begin{picture}(0,6)% | ||||||
|  |   \put(0,4){\line(1,0){170}}% | ||||||
|  |   \multiput(0,2)(10,0){18}{\line(0,1){4}}% | ||||||
|  |   \multiput(0,3)(1,0){170}{\line(0,1){2}}% | ||||||
|  |   \put(0,0){\makebox(0,0){{\tiny 0}}}% | ||||||
|  |   \put(10,0){\makebox(0,0){{\tiny 1}}}% | ||||||
|  |   \put(20,0){\makebox(0,0){{\tiny 2}}}% | ||||||
|  |   \put(30,0){\makebox(0,0){{\tiny 3}}}% | ||||||
|  |   \put(40,0){\makebox(0,0){{\tiny 4}}}% | ||||||
|  |   \put(50,0){\makebox(0,0){{\tiny 5}}}% | ||||||
|  |   \put(60,0){\makebox(0,0){{\tiny 6}}}% | ||||||
|  |   \put(70,0){\makebox(0,0){{\tiny 7}}}% | ||||||
|  |   \put(80,0){\makebox(0,0){{\tiny 8}}}% | ||||||
|  |   \put(90,0){\makebox(0,0){{\tiny 9}}}% | ||||||
|  |   \put(100,0){\makebox(0,0){{\tiny 10}}}% | ||||||
|  |   \put(110,0){\makebox(0,0){{\tiny 11}}}% | ||||||
|  |   \put(120,0){\makebox(0,0){{\tiny 12}}}% | ||||||
|  |   \put(130,0){\makebox(0,0){{\tiny 13}}}% | ||||||
|  |   \put(140,0){\makebox(0,0){{\tiny 14}}}% | ||||||
|  |   \put(150,0){\makebox(0,0){{\tiny 15}}}% | ||||||
|  |   \put(160,0){\makebox(0,0){{\tiny 16}}}% | ||||||
|  |   \put(170,0){\makebox(0,0){{\tiny 17}}}% | ||||||
|  |   \end{picture}\par} | ||||||
|  | 
 | ||||||
|  | % figures: | ||||||
|  | \setlength{\fboxsep}{0pt} | ||||||
|  | \newcommand{\texpicture}[1]{{\sffamily\footnotesize\input{#1.tex}}} | ||||||
|  | %\newcommand{\texpicture}[1]{\fbox{\sffamily\footnotesize\input{#1.tex}}} | ||||||
|  | %\newcommand{\texpicture}[1]{\setlength{\fboxsep}{2mm}\fbox{#1}} | ||||||
|  | %\newcommand{\texpicture}[1]{} | ||||||
|  | \newcommand{\figlabel}[1]{\textsf{\textbf{\large \uppercase{#1}}}} | ||||||
|  | 
 | ||||||
|  | % maximum number of floats: | ||||||
|  | \setcounter{topnumber}{2} | ||||||
|  | \setcounter{bottomnumber}{0} | ||||||
|  | \setcounter{totalnumber}{2} | ||||||
|  | 
 | ||||||
|  | % float placement fractions: | ||||||
|  | \renewcommand{\textfraction}{0.2} | ||||||
|  | \renewcommand{\topfraction}{0.8} | ||||||
|  | \renewcommand{\bottomfraction}{0.0} | ||||||
|  | \renewcommand{\floatpagefraction}{0.5} | ||||||
|  | 
 | ||||||
|  | % spacing for floats: | ||||||
|  | \setlength{\floatsep}{12pt plus 2pt minus 2pt} | ||||||
|  | \setlength{\textfloatsep}{20pt plus 4pt minus 2pt} | ||||||
|  | \setlength{\intextsep}{12pt plus 2pt minus 2pt} | ||||||
|  | 
 | ||||||
|  | % spacing for a floating page: | ||||||
|  | \makeatletter | ||||||
|  |   \setlength{\@fptop}{0pt} | ||||||
|  |   \setlength{\@fpsep}{8pt plus 2.0fil} | ||||||
|  |   \setlength{\@fpbot}{0pt plus 1.0fil} | ||||||
|  | \makeatother | ||||||
|  | 
 | ||||||
|  | % rules for floats: | ||||||
|  | \newcommand{\topfigrule}{\vspace*{10pt}{\hrule height0.4pt}\vspace*{-10.4pt}} | ||||||
|  | \newcommand{\bottomfigrule}{\vspace*{-10.4pt}{\hrule height0.4pt}\vspace*{10pt}} | ||||||
|  | 
 | ||||||
|  | % captions: | ||||||
|  | \usepackage[format=plain,singlelinecheck=off,labelfont=bf,font={small,sf}]{caption} | ||||||
|  | 
 | ||||||
|  | % put caption on separate float: | ||||||
|  | \newcommand{\breakfloat}{\end{figure}\begin{figure}[t]} | ||||||
|  | 
 | ||||||
|  | % references to panels of a figure within the caption: | ||||||
|  | \newcommand{\figitem}[1]{\textsf{\bfseries\uppercase{#1}}} | ||||||
|  | % references to figures: | ||||||
|  | \newcommand{\panel}[1]{\textsf{\uppercase{#1}}} | ||||||
|  | \newcommand{\fref}[1]{\textup{\ref{#1}}} | ||||||
|  | \newcommand{\subfref}[2]{\textup{\ref{#1}}\,\panel{#2}} | ||||||
|  | % references to figures in normal text: | ||||||
|  | \newcommand{\fig}{Fig.} | ||||||
|  | \newcommand{\Fig}{Figure} | ||||||
|  | \newcommand{\figs}{Figs.} | ||||||
|  | \newcommand{\Figs}{Figures} | ||||||
|  | \newcommand{\figref}[1]{\fig~\fref{#1}} | ||||||
|  | \newcommand{\Figref}[1]{\Fig~\fref{#1}} | ||||||
|  | \newcommand{\figsref}[1]{\figs~\fref{#1}} | ||||||
|  | \newcommand{\Figsref}[1]{\Figs~\fref{#1}} | ||||||
|  | \newcommand{\subfigref}[2]{\fig~\subfref{#1}{#2}} | ||||||
|  | \newcommand{\Subfigref}[2]{\Fig~\subfref{#1}{#2}} | ||||||
|  | \newcommand{\subfigsref}[2]{\figs~\subfref{#1}{#2}} | ||||||
|  | \newcommand{\Subfigsref}[2]{\Figs~\subfref{#1}{#2}} | ||||||
|  | % references to figures within bracketed text: | ||||||
|  | \newcommand{\figb}{Fig.} | ||||||
|  | \newcommand{\figsb}{Figs.} | ||||||
|  | \newcommand{\figrefb}[1]{\figb~\fref{#1}} | ||||||
|  | \newcommand{\figsrefb}[1]{\figsb~\fref{#1}} | ||||||
|  | \newcommand{\subfigrefb}[2]{\figb~\subfref{#1}{#2}} | ||||||
|  | \newcommand{\subfigsrefb}[2]{\figsb~\subfref{#1}{#2}} | ||||||
|  | 
 | ||||||
|  | % references to tables: | ||||||
|  | \newcommand{\tref}[1]{\textup{\ref{#1}}} | ||||||
|  | % references to tables in normal text: | ||||||
|  | \newcommand{\tab}{Tab.} | ||||||
|  | \newcommand{\Tab}{Table} | ||||||
|  | \newcommand{\tabs}{Tabs.} | ||||||
|  | \newcommand{\Tabs}{Tables} | ||||||
|  | \newcommand{\tabref}[1]{\tab~\tref{#1}} | ||||||
|  | \newcommand{\Tabref}[1]{\Tab~\tref{#1}} | ||||||
|  | \newcommand{\tabsref}[1]{\tabs~\tref{#1}} | ||||||
|  | \newcommand{\Tabsref}[1]{\Tabs~\tref{#1}} | ||||||
|  | % references to tables within bracketed text: | ||||||
|  | \newcommand{\tabb}{Tab.} | ||||||
|  | \newcommand{\tabsb}{Tab.} | ||||||
|  | \newcommand{\tabrefb}[1]{\tabb~\tref{#1}} | ||||||
|  | \newcommand{\tabsrefb}[1]{\tabsb~\tref{#1}} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | %%%%% equation references %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | %\newcommand{\eqref}[1]{(\ref{#1})} | ||||||
|  | \newcommand{\eqn}{\tr{Eq}{Gl}.} | ||||||
|  | \newcommand{\Eqn}{\tr{Eq}{Gl}.} | ||||||
|  | \newcommand{\eqns}{\tr{Eqs}{Gln}.} | ||||||
|  | \newcommand{\Eqns}{\tr{Eqs}{Gln}.} | ||||||
|  | \newcommand{\eqnref}[1]{\eqn~\eqref{#1}} | ||||||
|  | \newcommand{\Eqnref}[1]{\Eqn~\eqref{#1}} | ||||||
|  | \newcommand{\eqnsref}[1]{\eqns~\eqref{#1}} | ||||||
|  | \newcommand{\Eqnsref}[1]{\Eqns~\eqref{#1}} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | %%%%% listings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | \usepackage{listings} | ||||||
|  | \lstset{ | ||||||
|  |   inputpath=../code, | ||||||
|  |   basicstyle=\ttfamily\footnotesize, | ||||||
|  |   numbers=left, | ||||||
|  |   showstringspaces=false, | ||||||
|  |   language=Matlab, | ||||||
|  |   commentstyle=\itshape\color{darkgray}, | ||||||
|  |   keywordstyle=\color{blue}, | ||||||
|  |   stringstyle=\color{green}, | ||||||
|  |   backgroundcolor=\color{blue!10}, | ||||||
|  |   breaklines=true, | ||||||
|  |   breakautoindent=true, | ||||||
|  |   columns=flexible, | ||||||
|  |   frame=single, | ||||||
|  |   caption={\protect\filename@parse{\lstname}\protect\filename@base}, | ||||||
|  |   captionpos=t, | ||||||
|  |   xleftmargin=1em, | ||||||
|  |   xrightmargin=1em, | ||||||
|  |   aboveskip=10pt | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | %%%%% math stuff: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | \usepackage{amsmath} | ||||||
|  | \usepackage{bm}  | ||||||
|  | \usepackage{dsfont} | ||||||
|  | \newcommand{\naZ}{\mathds{N}} | ||||||
|  | \newcommand{\gaZ}{\mathds{Z}} | ||||||
|  | \newcommand{\raZ}{\mathds{Q}} | ||||||
|  | \newcommand{\reZ}{\mathds{R}} | ||||||
|  | \newcommand{\reZp}{\mathds{R^+}} | ||||||
|  | \newcommand{\reZpN}{\mathds{R^+_0}} | ||||||
|  | \newcommand{\koZ}{\mathds{C}} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | %%%%% structure: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | \usepackage{ifthen} | ||||||
|  | 
 | ||||||
|  | \newcommand{\code}[1]{\texttt{#1}} | ||||||
|  | 
 | ||||||
|  | \newcommand{\source}[1]{     | ||||||
|  |   \begin{flushright} | ||||||
|  |     \color{gray}\scriptsize \url{#1} | ||||||
|  |   \end{flushright} | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | \newenvironment{definition}[1][]{\medskip\noindent\textbf{Definition}\ifthenelse{\equal{#1}{}}{}{ #1}:\newline}% | ||||||
|  |   {\medskip} | ||||||
|  | 
 | ||||||
|  | \newcounter{maxexercise}  | ||||||
|  | \setcounter{maxexercise}{9}  % show listings up to exercise maxexercise | ||||||
|  | \newcounter{theexercise}  | ||||||
|  | \setcounter{theexercise}{1} | ||||||
|  | \newenvironment{exercise}[1][]{\medskip\noindent\textbf{\tr{Exercise}{\"Ubung} | ||||||
|  |   \arabic{theexercise}:}\newline \newcommand{\exercisesource}{#1}}% | ||||||
|  |   {\ifthenelse{\equal{\exercisesource}{}}{}{\ifthenelse{\value{theexercise}>\value{maxexercise}}{}{\medskip\lstinputlisting{\exercisesource}}}\medskip\stepcounter{theexercise}} | ||||||
|  | 
 | ||||||
|  | \graphicspath{{figures/}} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | \begin{document}  | ||||||
|  | 
 | ||||||
|  | \include{designpattern} | ||||||
|  | 
 | ||||||
|  | \end{document} | ||||||
							
								
								
									
										166
									
								
								designpattern/lecture/designpattern.tex
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										166
									
								
								designpattern/lecture/designpattern.tex
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,166 @@ | |||||||
|  | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | \chapter{Design Pattern} | ||||||
|  | 
 | ||||||
|  | Beim Programmieren sind sich viel Codes in ihrer Grundstruktur sehr | ||||||
|  | \"ahnlich. Viele Konstrukte kommen in den verschiedensten Kontexten | ||||||
|  | immer wieder in \"ahnlicher Weise vor. In diesem Kapitel stellen wir | ||||||
|  | einige dieser ``Design pattern'' zusammen. | ||||||
|  | 
 | ||||||
|  | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | \section{Plotten einer mathematischen Funktion} | ||||||
|  | Eine mathematische Funktion ordnet einem beliebigen $x$-Wert einen | ||||||
|  | $y$-Wert zu. Um eine solche Funktion zeichnen zu k\"onnen, m\"ussen | ||||||
|  | wir uns eine Wertetabelle aus vielen $x$-Werten und den | ||||||
|  | dazugeh\"origen Funktionswerten $y=f(x)$ erstellen.  | ||||||
|  | 
 | ||||||
|  | Wir erstellen uns dazu einen Vektor mit geeigneten $x$-Werten, die von | ||||||
|  | dem kleinsten bis zu dem gr\"o{\ss}ten $x$-Wert laufen, den wir | ||||||
|  | plotten wollen. Die Schrittweite f\"ur die $x$-Werte w\"ahlen wir | ||||||
|  | klein genug, um eine sch\"one glatte Kurve zu bekommen. F\"ur jeden | ||||||
|  | Wert $x_i$ dieses Vektors berechnen wir den entsprechenden | ||||||
|  | Funktionswert und erzeugen damit einen Vektor mit den $y$-Werten. Die | ||||||
|  | Werte des $y$-Vektors k\"onnen dann gegen die Werte des $x$-Vektors | ||||||
|  | geplottet werden. | ||||||
|  | 
 | ||||||
|  | Folgende Programme berechnen und plotten die Funktion $f(x)=e^{-x^2}$: | ||||||
|  | \begin{lstlisting} | ||||||
|  | xmin = -1.0; | ||||||
|  | xmax = 2.0; | ||||||
|  | dx = 0.01;          % Schrittweite | ||||||
|  | x = xmin:dx:xmax;   % Vektor mit x-Werten | ||||||
|  | y = exp(-x.*x);     % keine for Schleife! '.*' fuer elementweises multiplizieren | ||||||
|  | plot(x, y); | ||||||
|  | \end{lstlisting} | ||||||
|  | 
 | ||||||
|  | \begin{lstlisting} | ||||||
|  | x = -1:0.01:2;      % Vektor mit x-Werten | ||||||
|  | y = exp(-x.*x);     % keine for Schleife! '.*' fuer elementweises multiplizieren | ||||||
|  | plot(x, y); | ||||||
|  | \end{lstlisting} | ||||||
|  | 
 | ||||||
|  | \begin{lstlisting} | ||||||
|  | x = -1:0.01:2;      % Vektor mit x-Werten | ||||||
|  | plot(x, exp(-x.*x)); | ||||||
|  | \end{lstlisting} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | \section{Skalieren und Verschieben nicht nur von Zufallszahlen} | ||||||
|  | Zufallsgeneratoren geben oft nur Zufallszahlen mit festen Mittelwerten | ||||||
|  | und Standardabweichungen (auch Skalierungen) zur\"uck. Multiplikation | ||||||
|  | mit einem Faktor skaliert die Standardabweichung und Addition einer Zahl | ||||||
|  | verschiebt den Mittelwert. | ||||||
|  | 
 | ||||||
|  | \begin{lstlisting} | ||||||
|  | % 100 random numbers draw from a Gaussian distribution with mean 0 and standard deviation 1. | ||||||
|  | x = randn(100, 1); | ||||||
|  | 
 | ||||||
|  | % 100 random numbers drawn from a Gaussian distribution with mean 4.8 and standard deviation 2.3. | ||||||
|  | mu = 4.8; | ||||||
|  | sigma = 2.3; | ||||||
|  | y = randn(100, 1)*sigma + mu; | ||||||
|  | \end{lstlisting} | ||||||
|  | 
 | ||||||
|  | Das ist manchmal auch sinnvoll f\"ur \code{zeros} oder \code{ones}: | ||||||
|  | \begin{lstlisting} | ||||||
|  | x = -1:0.01:2;      % Vektor mit x-Werten | ||||||
|  | plot(x, exp(-x.*x)); | ||||||
|  | % Plotte f\"ur die gleichen x-Werte eine Linie mit y=0.8: | ||||||
|  | plot(x, zeros(size(x))+0.8); | ||||||
|  | % ... Linie mit y=0.5: | ||||||
|  | plot(x, ones(size(x))*0.5); | ||||||
|  | \end{lstlisting} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | \section{for Schleifen \"uber Vektoren} | ||||||
|  | Manchmal m\"ochte man doch mit einer for-Schleife \"uber einen Vektor iterieren: | ||||||
|  | \begin{lstlisting} | ||||||
|  | x = [2:3:20];   % irgendein Vektor | ||||||
|  | for i=1:length(x) | ||||||
|  |   % Benutze den Wert des Vektors x an der Stelle des Indexes i: | ||||||
|  |   do_something( x(i) ); | ||||||
|  | end | ||||||
|  | \end{lstlisting} | ||||||
|  | 
 | ||||||
|  | Wenn in der Schleife das Ergebnis in einen Vektor gespeichert werden soll, | ||||||
|  | sollten wir uns vor der Schleife schon einen Vektor f\"ur die Ergebnisse | ||||||
|  | erstellen: | ||||||
|  | \begin{lstlisting} | ||||||
|  | x = [2:3:20];        % irgendein Vektor | ||||||
|  | y = zeros(size(x));  % Platz fuer die Ergebnisse | ||||||
|  | for i=1:length(x) | ||||||
|  |   % Schreibe den Rueckgabewert der Funktion get_something an die i-te | ||||||
|  |   % Stelle von y: | ||||||
|  |   y(i) = get_something( x(i) ); | ||||||
|  | end | ||||||
|  | % jetzt koennen wir den Ergebnisvektor weiter bearbeiten: | ||||||
|  | mean(y) | ||||||
|  | \end{lstlisting} | ||||||
|  | 
 | ||||||
|  | Die Berechnungen in der Schleife k\"onnen statt einer Zahl auch einen Vektor | ||||||
|  | zur\"uckgeben. Wenn die L\"ange diese Vektors bekannt ist, dann kann vorher | ||||||
|  | eine entsprechend gro{\ss}e Matrix angelegt werden: | ||||||
|  | \begin{lstlisting} | ||||||
|  | x = [2:3:20];        % irgendein Vektor | ||||||
|  | y = zeros(length(x),10);  % Platz fuer die Ergebnisse | ||||||
|  | for i=1:length(x) | ||||||
|  |   % Schreibe den Rueckgabewert der Funktion get_something - jetzt ein | ||||||
|  |   % Vektor mit 10 Elementen - in die i-te | ||||||
|  |   % Zeile von y: | ||||||
|  |   y(i,:) = get_something( x(i) ); | ||||||
|  | end | ||||||
|  | % jetzt koennen wir die Ergebnismatrix weiter bearbeiten: | ||||||
|  | mean(y, 1) | ||||||
|  | \end{lstlisting} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | Alternativ k\"onnen die in der Schleife erzeugten Vektoren zu einem | ||||||
|  | einzigen, durchgehenden Vektor zusammengestellt werden: | ||||||
|  | \begin{lstlisting} | ||||||
|  | x = [2:3:20];        % irgendein Vektor | ||||||
|  | y = [];  % Leerer Vektor fuer die Ergebnisse | ||||||
|  | for i=1:length(x) | ||||||
|  |   % Die Funktion get_something gibt uns einen Vektor zurueck: | ||||||
|  |   z = get_something( x(i) ); | ||||||
|  |   % dessen Inhalt h\"angen wir an unseren Ergebnissvektor an: | ||||||
|  |   y = [y z(:)]; | ||||||
|  | end | ||||||
|  | % jetzt koennen wir dem Ergebnisvektor weiter bearbeiten: | ||||||
|  | mean(y) | ||||||
|  | \end{lstlisting} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | \section{Normierung von Histogrammen} | ||||||
|  | Meistens sollten Histogramme normiert werden, damit sie vergleichbar | ||||||
|  | mit anderen Histogrammen oder mit theoretischen | ||||||
|  | Wahrscheinlichkeitsverteilungen werden. | ||||||
|  | 
 | ||||||
|  | Die \code{histogram} Funktion macht das mit den entsprechenden Parametern automatisch: | ||||||
|  | \begin{lstlisting} | ||||||
|  | x = randn(100, 1);    % irgendwelche reellwertige Daten | ||||||
|  | histogram(x, 'Normalization', 'pdf'); | ||||||
|  | \end{lstlisting} | ||||||
|  | 
 | ||||||
|  | \begin{lstlisting} | ||||||
|  | x = randi(6, 100, 1);    % irgendwelche integer Daten | ||||||
|  | histogram(x, 'Normalization', 'probability'); | ||||||
|  | \end{lstlisting} | ||||||
|  | 
 | ||||||
|  | So geht es aber auch: | ||||||
|  | \begin{lstlisting} | ||||||
|  | x = randn(100, 1);         % irgendwelche reellwertige Daten | ||||||
|  | [h, b] = hist(x);          % Histogram berechnen | ||||||
|  | h = h/sum(h)/(b(2)-b(1));  % normieren zu einer Wahrscheinlichkeitsdichte | ||||||
|  | bar(b, h);                 % und plotten. | ||||||
|  | \end{lstlisting} | ||||||
|  | 
 | ||||||
|  | \begin{lstlisting} | ||||||
|  | x = randi(6, 100, 1);    % irgendwelche integer Daten | ||||||
|  | [h, b] = hist(x);        % Histogram berechnen | ||||||
|  | h = h/sum(h);            % normieren zu Wahrscheinlichkeiten | ||||||
|  | bar(b, h);               % und plotten. | ||||||
|  | \end{lstlisting} | ||||||
| @ -14,6 +14,6 @@ function spikes = hompoissonspikes( trials, rate, tmax ) | |||||||
|     x = rand( trials, ceil(tmax/dt) ); |     x = rand( trials, ceil(tmax/dt) ); | ||||||
|     spikes = cell( trials, 1 ); |     spikes = cell( trials, 1 ); | ||||||
|     for k=1:trials |     for k=1:trials | ||||||
|         spikes{k} = find( x(k,:) >= 1.0-p ) * dt; |         spikes{k} = find( x(k,:) < p ) * dt; | ||||||
|     end |     end | ||||||
| end | end | ||||||
|  | |||||||
| @ -93,7 +93,7 @@ jan.benda@uni-tuebingen.de} | |||||||
| Wir wollen den homogenen Poisson Prozess benutzen um Spikes zu generieren, | Wir wollen den homogenen Poisson Prozess benutzen um Spikes zu generieren, | ||||||
| mit denen wir die Analysfunktionen des vorherigen \"Ubungszettel \"uberpr\"ufen k\"onnen. | mit denen wir die Analysfunktionen des vorherigen \"Ubungszettel \"uberpr\"ufen k\"onnen. | ||||||
| 
 | 
 | ||||||
| Ein homogener Poisson Prozess mit der Rate $\lambda$ (measured in Hertz) ist ein Punktprozess, | Ein homogener Poisson Prozess mit der Rate $\lambda$ (gemessen in Hertz) ist ein Punktprozess, | ||||||
| bei dem die Wahrschienlichkeit eines Ereignisses unabh\"angig von der Zeit $t$ und | bei dem die Wahrschienlichkeit eines Ereignisses unabh\"angig von der Zeit $t$ und | ||||||
| unabh\"angig von vorherigen Ereignissen ist. | unabh\"angig von vorherigen Ereignissen ist. | ||||||
| Die Wahrscheinlichkeit $P$ eines Ereignisses innerhalb eines Bins der Breite $\Delta t$ ist | Die Wahrscheinlichkeit $P$ eines Ereignisses innerhalb eines Bins der Breite $\Delta t$ ist | ||||||
| @ -102,7 +102,7 @@ f\"ur gen\"ugend kleine $\Delta t$. | |||||||
| \begin{parts} | \begin{parts} | ||||||
|    |    | ||||||
|   \part Schreibe eine Funktion die $n$ homogene Poisson Spiketrains |   \part Schreibe eine Funktion die $n$ homogene Poisson Spiketrains | ||||||
|   einer gegebenen Dauer $T_{max}$ mit rate $\lambda$ erzeugt. |   einer gegebenen Dauer $T_{max}$ mit Rate $\lambda$ erzeugt. | ||||||
|   \begin{solution} |   \begin{solution} | ||||||
|     \lstinputlisting{hompoissonspikes.m} |     \lstinputlisting{hompoissonspikes.m} | ||||||
|   \end{solution} |   \end{solution} | ||||||
| @ -122,8 +122,8 @@ f\"ur gen\"ugend kleine $\Delta t$. | |||||||
|   Poisson Spiketrains mit der Rate $\lambda=100$\,Hz. Ver\"andere |   Poisson Spiketrains mit der Rate $\lambda=100$\,Hz. Ver\"andere | ||||||
|   \"uber die Dauer $T_{max}$ der Spiketrains und die Anzahl $n$ der |   \"uber die Dauer $T_{max}$ der Spiketrains und die Anzahl $n$ der | ||||||
|   Trials die Anzahl der Intervalle und ver\"andere auch die Binbreite |   Trials die Anzahl der Intervalle und ver\"andere auch die Binbreite | ||||||
|   des Histograms (fange mit 1\,ms an). Wieviele Interspikeintervalle |   des Histograms (fang mit 1\,ms an). Wieviele Interspikeintervalle | ||||||
|   werden ben\"otigt um ein ``sch\"ones'' Histogramm zu erhalten? Wie |   werden ben\"otigt, um ein ``sch\"ones'' Histogramm zu erhalten? Wie | ||||||
|   lange m\"usste man also von dem Neuron ableiten? |   lange m\"usste man also von dem Neuron ableiten? | ||||||
|   \begin{solution} |   \begin{solution} | ||||||
|     About 5000 intervals for 25 bins. This corresponds to a $5000 / |     About 5000 intervals for 25 bins. This corresponds to a $5000 / | ||||||
| @ -131,56 +131,62 @@ f\"ur gen\"ugend kleine $\Delta t$. | |||||||
|     100\,\hertz. |     100\,\hertz. | ||||||
|   \end{solution} |   \end{solution} | ||||||
|    |    | ||||||
|   \part Vergleiche das Histogramm mit der zu erwartenden Verteilung |   \part Vergleiche Interspike-Intervall Histogramme von Poisson-Spikes | ||||||
|  |   verschiedener Raten $\lambda$ mit der theoretisch zu erwartenden Verteilung | ||||||
|   der Intervalle $T$ des Poisson Prozesses |   der Intervalle $T$ des Poisson Prozesses | ||||||
|   \[ p(T) = \lambda e^{-\lambda T} \] |   \[ p(T) = \lambda e^{-\lambda T} \; .\] | ||||||
|   mit rate $\lambda$. |  | ||||||
|   \begin{solution} |   \begin{solution} | ||||||
|     \lstinputlisting{hompoissonisih.m} |     \lstinputlisting{hompoissonisih.m} | ||||||
|     \colorbox{white}{\includegraphics[width=0.48\textwidth]{poissonisih100hz}} |     \colorbox{white}{\includegraphics[width=0.48\textwidth]{poissonisih100hz}} | ||||||
|     \colorbox{white}{\includegraphics[width=0.48\textwidth]{poissonisih20hz}} |     \colorbox{white}{\includegraphics[width=0.48\textwidth]{poissonisih20hz}} | ||||||
|   \end{solution} |   \end{solution} | ||||||
|    |    | ||||||
|   \part \extra Was pasiert mit den Histogrammen, wenn die Binbreite der Histogramme kleiner |   \part \extra Was pasiert mit den Histogrammen, wenn die Binbreite | ||||||
|   als das bei der Erzeugung der $\Delta t$ der  |   der Histogramme kleiner als das bei der Erzeugung der Poisson | ||||||
|   used for generating the Poisson spikes? |   Spiketrains verwendete $\Delta t$ ist? | ||||||
|   \begin{solution} |   \begin{solution} | ||||||
|     The bins between the discretization have zero entries. Therefore |     Die Bins zwischen der durch $\Delta t$ vorgegebenen | ||||||
|     the other ones become higher than they should be. |     Diskretisierung haben den Wert 0. Dadurch werden aber die anderen | ||||||
|  |     durch die Normierung h\"oher als sie sein sollten. | ||||||
|   \end{solution} |   \end{solution} | ||||||
|    |    | ||||||
|   \part Plot the mean interspike interval, the corresponding standard deviation, and the CV |   \part Plotte den Mittelwert der Interspikeintervalle, die | ||||||
|   as a function of the rate $\lambda$ of the Poisson process. |   dazugeh\"orige Standardabweichung und den Variationskoeffizienten | ||||||
|   Compare the ../code with the theoretical expectations for the dependence on $\lambda$. |   als Funktion der Rate $\lambda$ des Poisson Prozesses. Vergleiche | ||||||
|  |   die Ergebnisse mit den theoretischen Erwartungen (siehe Vorlesungsskript). | ||||||
|   \begin{solution} |   \begin{solution} | ||||||
|     \lstinputlisting{hompoissonisistats.m} |     \lstinputlisting{hompoissonisistats.m} | ||||||
|     \colorbox{white}{\includegraphics[width=0.98\textwidth]{poissonisistats}} |     \colorbox{white}{\includegraphics[width=0.98\textwidth]{poissonisistats}} | ||||||
|   \end{solution} |   \end{solution} | ||||||
|    |    | ||||||
|   \part Write a function that computes serial correlations for the interspike intervals |   \part Plotte die seriellen Korrelationen von Poisson-Spiketrains und | ||||||
|   for a range of lags. |   erkl\"are kurz das Ergebniss. | ||||||
|   The serial correlations $\rho_k$ at lag $k$ are defined as |  | ||||||
|   \[ \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)} \] |  | ||||||
|   Use this function to show that interspike intervals of Poisson spikes are independent. |  | ||||||
|   \begin{solution} |   \begin{solution} | ||||||
|     \lstinputlisting{../code/isiserialcorr.m} |     \mbox{}\\[-2ex]\hspace*{2cm} | ||||||
|     \colorbox{white}{\includegraphics[width=0.98\textwidth]{poissonserial100hz}} |     \colorbox{white}{\includegraphics[width=0.8\textwidth]{poissonserial100hz}}\\ | ||||||
|  |     Alle Korrelationen zwischen Interspikeintervallen sind Null, da | ||||||
|  |     beim Poisson Prozess das Auftreten jedes Spikes unabh\"angig von | ||||||
|  |     den vorherigen Spikes ist. | ||||||
|   \end{solution} |   \end{solution} | ||||||
|    |    | ||||||
|   \part Write a function that generates from spike times  |   \part Vergleiche Histogramme von Spikecounts gez\"ahlt in Fenstern | ||||||
|   a histogram of spike counts in a count window of given duration $W$. |   der Breite $W$ mit der Poisson Verteilung | ||||||
|   The function should also plot the Poisson distribution |   \[ P(k) = \frac{(\lambda W)^ke^{\lambda W}}{k!} \; , \]  | ||||||
|   \[ P(k) = \frac{(\lambda W)^ke^{\lambda W}}{k!} \] |   wobei die Rate $\lambda$ aus den Daten bestimmt werden | ||||||
|   for the rate $\lambda$ determined from the spike trains. |   soll. Hinweis: es gibt eine \code{matlab} Funktion, die die | ||||||
|  |   Fakult\"at $n!$ berechnet. | ||||||
|   \begin{solution} |   \begin{solution} | ||||||
|     \lstinputlisting{../code/counthist.m} |     \lstinputlisting{../code/counthist.m} | ||||||
|     \colorbox{white}{\includegraphics[width=0.48\textwidth]{poissoncounthistdist100hz10ms}} |     \colorbox{white}{\includegraphics[width=0.48\textwidth]{poissoncounthistdist100hz10ms}} | ||||||
|     \colorbox{white}{\includegraphics[width=0.48\textwidth]{poissoncounthistdist100hz100ms}} |     \colorbox{white}{\includegraphics[width=0.48\textwidth]{poissoncounthistdist100hz100ms}} | ||||||
|   \end{solution} |   \end{solution} | ||||||
|    |    | ||||||
|   \part Write a function that computes mean count, variance of count and the corresponding Fano factor |   \part Schreibe eine Funktion, die die mittlere Anzahl, die Varianz | ||||||
|   for a range of count window durations. The function should generate tow plots: one plotting |   und den Fano-Faktor der Anzahl der Spikes in einem Fenster der | ||||||
|   the count variance against the mean, the other one the Fano factor as a function of the window duration. |   Breite $W$ bestimmt. Benutze die Funktion, um diese Parameter f\"ur | ||||||
|  |   verschiedene Fensterbreiten $W$ zu bestimmen. Zwei Plots sollen aus | ||||||
|  |   den Ergebnissen angefertigt werden: (i) Varianz gegen Mittelwert der counts. | ||||||
|  |   (ii) Fano Faktor als Funktion der Fensterbreite. | ||||||
|   \begin{solution} |   \begin{solution} | ||||||
|     \lstinputlisting{../code/fano.m} |     \lstinputlisting{../code/fano.m} | ||||||
|     \colorbox{white}{\includegraphics[width=0.98\textwidth]{poissonfano100hz}} |     \colorbox{white}{\includegraphics[width=0.98\textwidth]{poissonfano100hz}} | ||||||
| @ -191,11 +197,3 @@ f\"ur gen\"ugend kleine $\Delta t$. | |||||||
| \end{questions} | \end{questions} | ||||||
| 
 | 
 | ||||||
| \end{document} | \end{document} | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|  Zus\"atzlich soll die Funktion |  | ||||||
|     die Poisson-Verteilung |  | ||||||
|     \[ P(k) = \frac{(\lambda W)^ke^{\lambda W}}{k!} \] mit der Rate |  | ||||||
|     $\lambda$, die aus den Daten bestimmt werden kann, mit zu dem |  | ||||||
|     Histogramm hineinzeichen. Hinweis: es gibt eine \code{matlab} Funktion, |  | ||||||
|     die die Fakult\"at $n!$ berechnet. |  | ||||||
| @ -224,48 +224,3 @@ | |||||||
| 
 | 
 | ||||||
| \end{document} | \end{document} | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |  | ||||||
| \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!} \] |  | ||||||
| @ -113,3 +113,52 @@ Insbesondere ist die mittlere Rate der Ereignisse $r$ (``Spikes pro Zeit'', Feue | |||||||
| % \end{figure} | % \end{figure} | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||||||
|  | \section{Homogener Poisson Prozess} | ||||||
|  | F\"ur kontinuierliche Me{\ss}gr\"o{\ss}en ist die Normalverteilung | ||||||
|  | u.a. wegem dem Zentralen Grenzwertsatz die Standardverteilung. Eine | ||||||
|  | \"ahnliche Rolle spilet bei Punktprozessen der ``Poisson Prozess''. | ||||||
|  | 
 | ||||||
|  | Beim homogenen Poisson Prozess treten Ereignisse mit einer festen Rate | ||||||
|  | $\lambda=\text{const.}$ auf und sind unabh\"angig von der Zeit $t$ und | ||||||
|  | unabh\"angig von den Zeitpunkten fr\"uherer Ereignisse. Die | ||||||
|  | Wahrscheinlichkeit zu irgendeiner Zeit ein Ereigniss in einem kleinen | ||||||
|  | Zeitfenster der Breite $\Delta t$ zu bekommen ist | ||||||
|  | \[ P = \lambda \cdot \Delta t \; . \] | ||||||
|  | 
 | ||||||
|  | \begin{figure}[t] | ||||||
|  |   \includegraphics[width=1\textwidth]{poissonraster100hz} | ||||||
|  |   \caption{\label{hompoissonfig}Rasterplot von Spikes eine homogenen | ||||||
|  |     Poisson Prozesse mit $\lambda=100$\,Hz.} | ||||||
|  | \end{figure} | ||||||
|  | 
 | ||||||
|  | Beim inhomogenen Poisson Prozess h\"angt die Rate $\lambda$ von der | ||||||
|  | Zeit ab: $\lambda = \lambda(t)$. | ||||||
|  | 
 | ||||||
|  | \begin{figure}[t] | ||||||
|  |   \includegraphics[width=0.45\textwidth]{poissonisihexp20hz}\hfill | ||||||
|  |   \includegraphics[width=0.45\textwidth]{poissonisihexp100hz} | ||||||
|  |   \caption{\label{hompoissonisihfig}Interspikeintervallverteilungen | ||||||
|  |     zweier Poissonprozesse.} | ||||||
|  | \end{figure} | ||||||
|  | 
 | ||||||
|  | Der homogne Poissonprozess hat folgende Eigenschaften: | ||||||
|  | \begin{itemize} | ||||||
|  | \item Die Intervalle $T$ sind exponentiell verteilt: $p(T) = \lambda e^{-\lambda T}$ . | ||||||
|  | \item Das mittlere Intervall ist $\mu_{ISI} = \frac{1}{\lambda}$ . | ||||||
|  | \item Die Varianz der Intervalle ist $\sigma_{ISI}^2 = \frac{1}{\lambda^2}$ . | ||||||
|  | \item Der Variationskoeffizient ist also immer $CV_{ISI} = 1$ . | ||||||
|  | \item Die seriellen Korrelationen $\rho_k =0$ for $k>0$, da das | ||||||
|  |   Auftreten der Ereignisse unabh\"angig von der Vorgeschichte ist. Ein | ||||||
|  |   solcher Prozess wird auch Erneuerungsprozess genannt (``renewal | ||||||
|  |   process''). | ||||||
|  | \item Die Anzahl der Ereignisse $k$ innerhalb eines Fensters der L\"ange W ist Poissonverteilt: | ||||||
|  | \[ P(k) = \frac{(\lambda W)^ke^{\lambda W}}{k!} \] | ||||||
|  | \item Der Fano Faktor ist immer $F=1$ . | ||||||
|  | \end{itemize} | ||||||
|  | 
 | ||||||
|  | \begin{figure}[t] | ||||||
|  |   \includegraphics[width=0.48\textwidth]{poissoncounthistdist100hz10ms}\hfill | ||||||
|  |   \includegraphics[width=0.48\textwidth]{poissoncounthistdist100hz100ms} | ||||||
|  |   \caption{\label{hompoissoncountfig}Z\"ahlstatistik von Poisson Spikes.} | ||||||
|  | \end{figure} | ||||||
|  | |||||||
| @ -239,4 +239,7 @@ | |||||||
| \renewcommand{\texinputpath}{pointprocesses/lecture/} | \renewcommand{\texinputpath}{pointprocesses/lecture/} | ||||||
| \include{pointprocesses/lecture/pointprocesses} | \include{pointprocesses/lecture/pointprocesses} | ||||||
| 
 | 
 | ||||||
|  | \renewcommand{\codepath}{designpattern/code/} | ||||||
|  | \include{designpattern/lecture/designpattern} | ||||||
|  | 
 | ||||||
| \end{document} | \end{document} | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user