Updated projects

This commit is contained in:
Jan Benda 2015-11-02 09:36:45 +01:00
parent 0bdc7eab98
commit ce2345acdb
10 changed files with 115 additions and 88 deletions

View File

@ -1,7 +1,7 @@
%!PS-Adobe-2.0 EPSF-2.0 %!PS-Adobe-2.0 EPSF-2.0
%%Title: pointprocessscetchA.tex %%Title: pointprocessscetchA.tex
%%Creator: gnuplot 4.6 patchlevel 4 %%Creator: gnuplot 4.6 patchlevel 4
%%CreationDate: Mon Oct 26 09:31:15 2015 %%CreationDate: Wed Oct 28 18:47:55 2015
%%DocumentFonts: %%DocumentFonts:
%%BoundingBox: 50 50 373 135 %%BoundingBox: 50 50 373 135
%%EndComments %%EndComments
@ -433,7 +433,7 @@ SDict begin [
/Author (benda) /Author (benda)
% /Producer (gnuplot) % /Producer (gnuplot)
% /Keywords () % /Keywords ()
/CreationDate (Mon Oct 26 09:31:15 2015) /CreationDate (Wed Oct 28 18:47:55 2015)
/DOCINFO pdfmark /DOCINFO pdfmark
end end
} ifelse } ifelse

View File

@ -1,7 +1,7 @@
%!PS-Adobe-2.0 EPSF-2.0 %!PS-Adobe-2.0 EPSF-2.0
%%Title: pointprocessscetchB.tex %%Title: pointprocessscetchB.tex
%%Creator: gnuplot 4.6 patchlevel 4 %%Creator: gnuplot 4.6 patchlevel 4
%%CreationDate: Mon Oct 26 09:31:16 2015 %%CreationDate: Wed Oct 28 18:47:56 2015
%%DocumentFonts: %%DocumentFonts:
%%BoundingBox: 50 50 373 237 %%BoundingBox: 50 50 373 237
%%EndComments %%EndComments
@ -433,7 +433,7 @@ SDict begin [
/Author (benda) /Author (benda)
% /Producer (gnuplot) % /Producer (gnuplot)
% /Keywords () % /Keywords ()
/CreationDate (Mon Oct 26 09:31:16 2015) /CreationDate (Wed Oct 28 18:47:56 2015)
/DOCINFO pdfmark /DOCINFO pdfmark
end end
} ifelse } ifelse

View File

@ -6,8 +6,8 @@
\pagestyle{headandfoot} \pagestyle{headandfoot}
\runningheadrule \runningheadrule
\firstpageheadrule \firstpageheadrule
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/02/2014
-- 11/06/2014} -- 11/05/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{{\bf Supervisor:} Jan Benda} \firstpagefooter{}{}{{\bf Supervisor:} Jan Benda}
\runningfooter{}{}{} \runningfooter{}{}{}
@ -53,18 +53,19 @@
\begin{questions} \begin{questions}
\question You are recording the activity of a neuron in response to \question You are recording the activity of a neuron in response to
two different stimuli $I_1$ and $I_2$ (think of them, for example, two different stimuli $I_1$ and $I_2$ (think of them, for example,
of two sound waves with different intensities $I_1$ and of two sound waves with different intensities $I_1$ and $I_2$ and
$I_2$). Within an observation time of duration $W$ the neuron you measure the activity af an auditory neuron). Within an
responds stochastically with $n_i$ spikes. observation time of duration $W$ the neuron responds stochastically
with $n$ spikes.
How well can an upstream neuron discriminate the two stimuli based How well can an upstream neuron discriminate the two stimuli based
on the spike counts $n_i$? How does this depend on the slope of the on the spike counts $n$? How does this depend on the slope of the
tuning curve of the neural responses? How is this related to the tuning curve of the neural responses? How is this related to the
fano factor (the ratio between the variance and the mean of the fano factor (the ratio between the variance and the mean of the
spike counts)? spike counts)?
The neuron is implemented in the file \texttt{lifboltzmanspikes.m}. The neuron is implemented in the file \texttt{lifboltzmanspikes.m}.
Call it with the following parameters: Call it with the following parameters:
\begin{lstlisting} \begin{lstlisting}
trials = 10; trials = 10;
tmax = 50.0; tmax = 50.0;
@ -85,21 +86,24 @@ spikes = lifboltzmanspikes( trials, input, tmax, Dnoise, imax, ithresh, slope );
\begin{parts} \begin{parts}
\part \part
First, show two raster plots for the responses to the two differrent stimuli. First, show two raster plots for the responses to the two
differrent stimuli.
\part Measure the tuning curve of the neuron with respect to the input. That is, \part Measure the tuning curve of the neuron with respect to the
compute the mean firing rate as a function of the input input. That is, compute the mean firing rate as a function of the
strength. Find an appropriate range of input values. Do this for input strength. Find an appropriate range of input values. Do
different values of the \texttt{slope} parameter (values between this for different values of the \texttt{slope} parameter (values
0.1 and 2.0). between 0.1 and 2.0).
\part Generate histograms of the spike counts within $W=200$\,ms of the \part Generate histograms of the spike counts within $W=200$\,ms
responses to the two differrent stimuli $I_1$ and $I_2$. How do they depend on the slope of the responses to the two differrent stimuli $I_1$ and
of the tuning curve of the neuron? $I_2$. How do they depend on the slope of the tuning curve of the
neuron?
\part Think about a measure based on the spike count histograms that quantifies how well \part Think about a measure based on the spike count histograms
the two stimuli can be distinguished based on the spike that quantifies how well the two stimuli can be distinguished
counts. Plot the dependence of this measure as a function of the observation time $W$. based on the spike counts. Plot the dependence of this measure as
a function of the observation time $W$.
For which slopes can the two stimuli be well discriminated? For which slopes can the two stimuli be well discriminated?
@ -110,22 +114,26 @@ spikes = lifboltzmanspikes( trials, input, tmax, Dnoise, imax, ithresh, slope );
$I_2$. Find the threshold $n_{thresh}$ that results in the best $I_2$. Find the threshold $n_{thresh}$ that results in the best
discrimination performance. discrimination performance.
\part Also plot the Fano factor as a function of the slope. How is it related to the discriminability? \part Also plot the Fano factor as a function of the slope. How is
it related to the discriminability?
\uplevel{If you still have time you can continue with the following questions:} \uplevel{If you still have time you can continue with the
following questions:}
\part You may change the difference between the two stimuli $I_1$ and $I_2$ \part You may change the difference between the two stimuli $I_1$
as well as the intrinsic noise of the neuron via \texttt{Dnoise} and $I_2$ as well as the intrinsic noise of the neuron via
(change it in factors of ten, higher values will make the \texttt{Dnoise} (change it in factors of ten, higher values will
responses more variable) and repeat your analysis. make the responses more variable) and repeat your analysis.
\part For $I_1=10$ the mean firing is about $80$\,Hz. When changing the slope of the tuning curve \part For $I_1=10$ the mean firing is about $80$\,Hz. When
this firing rate may also change. Improve your analysis by finding for each slope the input changing the slope of the tuning curve this firing rate may also
that results exactly in a firing rate of $80$\,Hz. Set $I_2$ on unit above $I_1$. change. Improve your analysis by finding for each slope the input
that results exactly in a firing rate of $80$\,Hz. Set $I_2$ on
unit above $I_1$.
\part How does the dependence of the stimulus discrimination performance on the slope change \part How does the dependence of the stimulus discrimination
when you set both $I_1$ and $I_2$ such that they evoke $80$ and performance on the slope change when you set both $I_1$ and $I_2$
$100$\,Hz firing rate, respectively? such that they evoke $80$ and $100$\,Hz firing rate, respectively?
\end{parts} \end{parts}

View File

@ -6,8 +6,8 @@
\pagestyle{headandfoot} \pagestyle{headandfoot}
\runningheadrule \runningheadrule
\firstpageheadrule \firstpageheadrule
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/02/2014
-- 11/06/2014} -- 11/05/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{{\bf Supervisor:} Jan Benda} \firstpagefooter{}{}{{\bf Supervisor:} Jan Benda}
\runningfooter{}{}{} \runningfooter{}{}{}
@ -53,17 +53,18 @@
\begin{questions} \begin{questions}
\question You are recording the activity of a neuron in response to \question You are recording the activity of a neuron in response to
two different stimuli $I_1$ and $I_2$ (think of them, for example, two different stimuli $I_1$ and $I_2$ (think of them, for example,
of two sound waves with different intensities $I_1$ and of two light intensities with different intensities $I_1$ and $I_2$
$I_2$). Within an observation time of duration $W$ the neuron and the activity of a ganglion cell in the retina). Within an
responds stochastically with $n_i$ spikes. observation time of duration $W$ the neuron responds stochastically
with $n$ spikes.
How well can an upstream neuron discriminate the two How well can an upstream neuron discriminate the two
stimuli based on the spike counts $n_i$? How does this depend on the stimuli based on the spike counts $n$? How does this depend on the
duration $W$ of the observation time? How is this related to the fano factor duration $W$ of the observation time? How is this related to the fano factor
(the ratio between the variance and the mean of the spike counts)? (the ratio between the variance and the mean of the spike counts)?
The neuron is implemented in the file \texttt{lifadaptspikes.m}. The neuron is implemented in the file \texttt{lifadaptspikes.m}.
Call it with the following parameters: Call it with the following parameters:
\begin{lstlisting} \begin{lstlisting}
trials = 10; trials = 10;
tmax = 50.0; tmax = 50.0;
@ -74,8 +75,9 @@ adaptincr = 0.5;
spikes = lifadaptspikes( trials, input, tmax, Dnoise, adapttau, adaptincr ); spikes = lifadaptspikes( trials, input, tmax, Dnoise, adapttau, adaptincr );
\end{lstlisting} \end{lstlisting}
The returned \texttt{spikes} is a cell array with \texttt{trials} elements, each being a vector The returned \texttt{spikes} is a cell array with \texttt{trials}
of spike times (in seconds) computed for a duration of \texttt{tmax} seconds. elements, each being a vector of spike times (in seconds) computed
for a duration of \texttt{tmax} seconds.
For the two inputs $I_1$ and $I_2$ use For the two inputs $I_1$ and $I_2$ use
\begin{lstlisting} \begin{lstlisting}
@ -88,12 +90,13 @@ input = 75.0; % I_2
Show two raster plots for the responses to the two different stimuli. Show two raster plots for the responses to the two different stimuli.
\part Generate histograms of the spike counts within $W$ of the \part Generate histograms of the spike counts within $W$ of the
responses to the two different stimuli. How do they depend on the observation time $W$ responses to the two different stimuli. How do they depend on the
(use values between 1\,ms and 1\,s)? observation time $W$ (use values between 1\,ms and 1\,s)?
\part Think about a measure based on the spike count histograms that quantifies how well \part Think about a measure based on the spike count histograms
the two stimuli can be distinguished based on the spike that quantifies how well the two stimuli can be distinguished
counts. Plot the dependence of this measure as a function of the observation time $W$. based on the spike counts. Plot the dependence of this measure as
a function of the observation time $W$.
For which observation times can the two stimuli perfectly discriminated? For which observation times can the two stimuli perfectly discriminated?
@ -104,13 +107,16 @@ input = 75.0; % I_2
$I_2$. For a given $W$ find the threshold $n_{thresh}$ that $I_2$. For a given $W$ find the threshold $n_{thresh}$ that
results in the best discrimination performance. results in the best discrimination performance.
\part Also plot the Fano factor as a function of $W$. How is it related to the discriminability? \part Also plot the Fano factor as a function of $W$. How is it
related to the discriminability?
\uplevel{If you still have time you can continue with the following question:} \uplevel{If you still have time you can continue with the
following question:}
\part You may change the two stimuli $I_1$ and $I_2$ and the intrinsic noise of the neuron via \part You may change the two stimuli $I_1$ and $I_2$ and the
\texttt{Dnoise} (change it in factors of ten, higher values will make the responses more variable) intrinsic noise of the neuron via \texttt{Dnoise} (change it in
and repeat your analysis. factors of ten, higher values will make the responses more
variable) and repeat your analysis.
\end{parts} \end{parts}

View File

@ -6,8 +6,8 @@
\pagestyle{headandfoot} \pagestyle{headandfoot}
\runningheadrule \runningheadrule
\firstpageheadrule \firstpageheadrule
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/02/2014
-- 11/06/2014} -- 11/05/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{{\bf Supervisor:} Jan Benda} \firstpagefooter{}{}{{\bf Supervisor:} Jan Benda}
\runningfooter{}{}{} \runningfooter{}{}{}
@ -51,9 +51,9 @@
%%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%%
\begin{questions} \begin{questions}
\question You are recording the activity of two neurons in response to \question You are recording the activity of two neurons in response
a constant stimulus $I$ (think of it, for example, to a constant stimulus $I$ (think of it, for example, of a sound
of a sound wave with intensity $I$). wave with intensity $I$ and the activity of an auditory neuron).
For different inputs $I$ the interspike interval ($T$) distribution looks For different inputs $I$ the interspike interval ($T$) distribution looks
quite different. You want to compare these distributions to quite different. You want to compare these distributions to
@ -72,8 +72,8 @@
p_\mathrm{ig}(T) = \frac{1}{\sqrt{4 \pi D T^{3}}} \exp \left[ - \frac{(T - \mu)^{2} }{4 D T \mu^{2}} \right] p_\mathrm{ig}(T) = \frac{1}{\sqrt{4 \pi D T^{3}}} \exp \left[ - \frac{(T - \mu)^{2} }{4 D T \mu^{2}} \right]
\end{equation} \end{equation}
where $\mu$ is the mean interspike interval and where $\mu$ is the mean interspike interval and
% $D=\textrm{var}(T)/(2\mu^3)$ $D=\textrm{var}(T)/(2\mu^3)$
$D$ is the so called diffusion coefficient. is the so called diffusion coefficient.
The third one was derived for neurons driven with colored noise: The third one was derived for neurons driven with colored noise:
\begin{equation}\label{pcn} \begin{equation}\label{pcn}
@ -92,9 +92,9 @@
\end{equation} \end{equation}
with $\delta=\mu/\tau$. with $\delta=\mu/\tau$.
The two neurons are implemented in the files \texttt{pifouspikes.m} The two neurons are implemented in the files \texttt{pifouspikes.m}
and \texttt{lifouspikes.m}. and \texttt{lifouspikes.m}. Call them with the following
Call them with the following parameters: parameters:
\begin{lstlisting} \begin{lstlisting}
trials = 10; trials = 10;
tmax = 50.0; tmax = 50.0;
@ -102,16 +102,19 @@ input = 10.0; % the input I
Dnoise = 1.0; % noise strength Dnoise = 1.0; % noise strength
outau = 1.0; % correlation time of the noise in seconds outau = 1.0; % correlation time of the noise in seconds
spikes = pifouspikes( trials, input, tmax, Dnoise, outau ); spikespif = pifouspikes( trials, input, tmax, Dnoise, outau );
spikeslif = lifouspikes( trials, input, tmax, Dnoise, outau );
\end{lstlisting} \end{lstlisting}
The returned \texttt{spikes} is a cell array with \texttt{trials} elements, each being a vector The returned \texttt{spikespif} and \texttt{spikeslif} are cell
of spike times (in seconds) computed for a duration of \texttt{tmax} seconds. arrays with \texttt{trials} elements, each being a vector of spike
The input is set via the \texttt{input} variable. times (in seconds) computed for a duration of \texttt{tmax}
seconds. The input is set via the \texttt{input} variable.
\begin{parts} \begin{parts}
\part For both model neurons find the inputs $I_i$ required to \part For both model neurons find the inputs $I_i$ required to
make them fire with a mean rate of 10, 20, 50, and 100\,Hz. make them fire with a mean rate of 10, 20, 50, and 100\,Hz.
\part Compute interspike interval distributions of the two model neurons for these inputs $I_i$. \part Compute interspike interval distributions of the two model
neurons for these inputs $I_i$.
\part Compare the interspike interval distributions with the exponential \part Compare the interspike interval distributions with the exponential
distribution eq.~(\ref{exppdf}) and the inverse Gaussian distribution eq.~(\ref{exppdf}) and the inverse Gaussian
@ -123,15 +126,17 @@ spikes = pifouspikes( trials, input, tmax, Dnoise, outau );
How well does this function describe the data? How well does this function describe the data?
Compare the fitted value for $\tau$ with the one used for the model (\texttt{outau}). Compare the fitted value for $\tau$ with the one used for the
model (\texttt{outau}).
\uplevel{If you still have time you can continue with the following question:} \uplevel{If you still have time you can continue with the following question:}
\part Compare the measured coefficient of variation with eq.~(\ref{cvpcn}). \part Compare the measured coefficient of variation with eq.~(\ref{cvpcn}).
\part Repeat your analysis for different values of the intrinsic noise strengh of the neurons \part Repeat your analysis for different values of the intrinsic
\texttt{Dnoise}. Increase or decrease it in factors of ten. noise strengh of the neurons \texttt{Dnoise}. Increase or decrease
it in factors of ten.
\end{parts} \end{parts}

View File

@ -6,10 +6,10 @@
\pagestyle{headandfoot} \pagestyle{headandfoot}
\runningheadrule \runningheadrule
\firstpageheadrule \firstpageheadrule
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/02/2014
-- 11/06/2014} -- 11/05/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{{\bf Supervisor:} Fabian Sinz} \firstpagefooter{}{}{{\bf Supervisor:} Jan Benda}
\runningfooter{}{}{} \runningfooter{}{}{}
\pointsinmargin \pointsinmargin
\bracketedpoints \bracketedpoints
@ -33,7 +33,7 @@
\begin{questions} \begin{questions}
\question A subject was presented two possible objects for a very \question A subject was presented two possible objects for a very
brief time ($50$ms). The task of the subject was to report which of brief time ($50$\,ms). The task of the subject was to report which of
the two objects was shown. In {\tt decisions.mat} you find an array the two objects was shown. In {\tt decisions.mat} you find an array
that stores which object was presented in each trial and which that stores which object was presented in each trial and which
object was reported by the subject. object was reported by the subject.
@ -50,6 +50,10 @@
information $$I[x:y] = \sum_{x\in\{1,2\}}\sum_{y\in\{1,2\}} P(x,y) information $$I[x:y] = \sum_{x\in\{1,2\}}\sum_{y\in\{1,2\}} P(x,y)
\log_2\frac{P(x,y)}{P(x)P(y)}$$ that the answers provide about the \log_2\frac{P(x,y)}{P(x)P(y)}$$ that the answers provide about the
actually presented object. actually presented object.
The mutual information is a measure from information theory that is
used in neuroscience to quantify, for example, how much information
a spike train carries about a sensory stimulus.
\part What is the maximally achievable mutual information (try to \part What is the maximally achievable mutual information (try to
find out by generating your own dataset which naturally should find out by generating your own dataset which naturally should
yield maximal information)? yield maximal information)?

View File

@ -6,8 +6,8 @@
\pagestyle{headandfoot} \pagestyle{headandfoot}
\runningheadrule \runningheadrule
\firstpageheadrule \firstpageheadrule
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/02/2014
-- 11/06/2014} -- 11/05/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{{\bf Supervisor:} Jan Benda} \firstpagefooter{}{}{{\bf Supervisor:} Jan Benda}
\runningfooter{}{}{} \runningfooter{}{}{}
@ -53,15 +53,15 @@
\begin{questions} \begin{questions}
\question You are recording the activity of a neuron in response to \question You are recording the activity of a neuron in response to
constant stimuli of intensity $I$ (think of that, for example, constant stimuli of intensity $I$ (think of that, for example,
of sound waves with intensities $I$). as a current $I$ injected via a patch-electrode into the neuron).
Measure the tuning curve (also called the intensity-response curve) of the Measure the tuning curve (also called the intensity-response curve) of the
neuron. That is, what is the firing rate of the neuron's response neuron. That is, what is the firing rate of the neuron's response
as a function of the input $I$. How does this depend on the level of as a function of the input $I$. How does this depend on the level of
the intrinsic noise of the neuron? the intrinsic noise of the neuron?
The neuron is implemented in the file \texttt{lifspikes.m}. The neuron is implemented in the file \texttt{lifspikes.m}. Call it
Call it with the following parameters: with the following parameters:
\begin{lstlisting} \begin{lstlisting}
trials = 10; trials = 10;
tmax = 50.0; tmax = 50.0;
@ -81,8 +81,13 @@ spikes = lifspikes( trials, input, tmax, Dnoise );
\part Do the same for various noise strength \texttt{Dnoise}. Use $D_{noise} = 1e-3$, \part Do the same for various noise strength \texttt{Dnoise}. Use $D_{noise} = 1e-3$,
1e-2, and 1e-1. How does the intrinsic noise influence the response curve? 1e-2, and 1e-1. How does the intrinsic noise influence the response curve?
\part Show some interspike interval histograms for some interesting values of the input \part Show some interspike interval histograms for some
and the noise strength. interesting values of the input and the noise strength.
\part How does the coefficient of variation $CV_{isi}$ (standard
deviation divided by mean) of the interspike intervalls depend on
the input and the noise level?
\end{parts} \end{parts}

View File

@ -4,7 +4,7 @@
\setcounter{maxexercise}{10000} % show listings up to exercise maxexercise \setcounter{maxexercise}{10000} % show listings up to exercise maxexercise
\graphicspath{{statistics/lecture/}{statistics/lecture/figures/}{bootstrap/lecture/}{bootstrap/lecture/figures/}{likelihood/lecture/}{likelihood/lecture/figures/}{pointprocesses/lecture/}{pointprocesses/lecture/figures/}{programming/lectures/images/}} \graphicspath{{statistics/lecture/}{statistics/lecture/figures/}{bootstrap/lecture/}{bootstrap/lecture/figures/}{likelihood/lecture/}{likelihood/lecture/figures/}{pointprocesses/lecture/}{pointprocesses/lecture/figures/}{programming/lectures/images/}{spike_trains/lecture/images/}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -34,8 +34,7 @@
\renewcommand{\texinputpath}{pointprocesses/lecture/} \renewcommand{\texinputpath}{pointprocesses/lecture/}
\include{pointprocesses/lecture/pointprocesses} \include{pointprocesses/lecture/pointprocesses}
lstset{inputpath=spike_trains/code/} \lstset{inputpath=spike_trains/code/}
\renewcommand{\texinputpath}{spike_trains/lecture/}
\include{spike_trains/lecture/psth_sta} \include{spike_trains/lecture/psth_sta}
\lstset{inputpath=designpattern/code/} \lstset{inputpath=designpattern/code/}