Merge branch 'master' of raven:scientificComputing

This commit is contained in:
Jan Benda 2014-11-12 18:39:52 +01:00
commit 3e2ca6377f
23 changed files with 232 additions and 165 deletions

View File

@ -8,8 +8,8 @@
\vspace{1ex} \vspace{1ex}
The {\bf code} and the {\bf presentation} should be uploaded to The {\bf code} and the {\bf presentation} should be uploaded to
ILIAS at latest on Thursday, November 6th, 12:00h. ILIAS at latest on Thursday, November 6th, 10:00h.
The presentations start on Thursday 13:00h. Please hand in The presentations start on Thursday 11:00h. Please hand in
your presentation as a pdf file. Bundle everything into a your presentation as a pdf file. Bundle everything into a
{\em single} zip-file. {\em single} zip-file.
@ -26,7 +26,7 @@
variable names). variable names).
\vspace{1ex} \textbf{Please write your name and matriculation \vspace{1ex} \textbf{Please write your name and matriculation
number as a comment at the top of a script called \texttt{main.m}!} number as a comment at the top of a script called \texttt{main.m}.}
The \texttt{main.m} script then should call all your scripts. The \texttt{main.m} script then should call all your scripts.
\vspace{1ex} \vspace{1ex}

View File

@ -9,7 +9,7 @@
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014
-- 11/06/2014} -- 11/06/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{} \firstpagefooter{}{}{{\bf Supervisor:} Jan Grewe}
\runningfooter{}{}{} \runningfooter{}{}{}
\pointsinmargin \pointsinmargin
\bracketedpoints \bracketedpoints
@ -30,8 +30,8 @@
\end{center} \end{center}
%%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Estimating the time-constant of adaptation.} \section*{Estimating the adaptation time-constant.}
Stimulating a neuron with a constant stimulus for an extended time Stimulating a neuron with a constant stimulus for an extended period of time
often leads to a strong initial response that relaxes over time. This often leads to a strong initial response that relaxes over time. This
process is called adaptation and is ubiquitous. Your task here is to process is called adaptation and is ubiquitous. Your task here is to
estimate the time-constant of the firing-rate adaptation in P-unit estimate the time-constant of the firing-rate adaptation in P-unit
@ -41,8 +41,8 @@ electroreceptors of the weakly electric fish \textit{Apteronotus
\begin{questions} \begin{questions}
\question In the accompanying datasets you find the \question In the accompanying datasets you find the
\textit{spike\_times} of an P-unit electrorecptor to a stimulus of a \textit{spike\_times} of an P-unit electrorecptor to a stimulus of a
certain intensity, i.e. the \textit{contrast}. The contrast is also certain intensity, i.e. the \textit{contrast} which is also stored
part of the file name itself. in the file.
\begin{parts} \begin{parts}
\part Estimate for each stimulus intensity the \part Estimate for each stimulus intensity the
PSTH and plot it. You will see that there are three parts. (i) PSTH and plot it. You will see that there are three parts. (i)

View File

@ -1,4 +1,4 @@
\documentclass[addpoints,10pt]{exam} \documentclass[addpoints,11pt]{exam}
\usepackage{url} \usepackage{url}
\usepackage{color} \usepackage{color}
\usepackage{hyperref} \usepackage{hyperref}
@ -9,7 +9,7 @@
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014
-- 11/06/2014} -- 11/06/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{} \firstpagefooter{}{}{{\bf Supervisor:} Fabian Sinz}
\runningfooter{}{}{} \runningfooter{}{}{}
\pointsinmargin \pointsinmargin
\bracketedpoints \bracketedpoints
@ -46,10 +46,12 @@
$\sin(2\pi j\omega_0\cdot t + \varphi_j )$ are called {\em $\sin(2\pi j\omega_0\cdot t + \varphi_j )$ are called {\em
harmonic components}. The variables $\varphi_j$ are called {\em harmonic components}. The variables $\varphi_j$ are called {\em
phases}. For the beginning choose $n=3$. phases}. For the beginning choose $n=3$.
\part Play around with $n$ and see how the fit changes. Plot the \part Try different choices of $n$ and see how the fit
fits and the original curve for different choices of $n$. If you changes. Plot the fits and the original curve for different
want you can also play the different fits and the original as choices of $n$. Also plot the fitting error as a function of
sound. $n$.
\part (optional) If you want you can also play the different fits
and the original as sound.
\end{parts} \end{parts}
\end{questions} \end{questions}

View File

@ -9,7 +9,7 @@
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014
-- 11/06/2014} -- 11/06/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{} \firstpagefooter{}{}{{\bf Supervisor:} Jan Grewe}
\runningfooter{}{}{} \runningfooter{}{}{}
\pointsinmargin \pointsinmargin
\bracketedpoints \bracketedpoints
@ -31,10 +31,10 @@
%%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Analysis of eye trajectories.} \section*{Analysis of eye trajectories.}
In this project you will analyse eye-tracking data provided by the In this project you will analyse eye-tracking data (courtesy of the
Mallot-Group. In this task the subject had to memorize the positions Mallot department). In this task the subject had to memorize the
of targets that can be only learned with active gaze shifts. The eye positions of targets that can be only learned with active gaze
movements during training and test are recorded. shifts. The eye movements during training and test are recorded.
\begin{questions} \begin{questions}
\question In the accompanying dataset you find six variables. (i) \question In the accompanying dataset you find six variables. (i)
@ -48,15 +48,15 @@ movements during training and test are recorded.
the same marker belong to the same trial. the same marker belong to the same trial.
\begin{parts} \begin{parts}
\part Cut the data in chunks belonging to the same trial. \part Cut the data in chunks belonging to the same trial.
\part Characterize the eye movements statistically; eye \part Characterize the eye movements statistically, e.g. with eye
velocity, accelerations. speed and/or accelerations.
\part Detect and correct the eye traces for instances in which the \part Detect and correct the eye traces for instances in which the
eye was not correctly detected. Interpolate linearily in these sections. eye was not correctly detected. Interpolate linearily in these sections.
\part Create a 'heatmap' plot that shows the eye trajectories \part Create a 'heatmap' plot that shows the eye trajectories
for one or two (nice) trials. for one or two (nice) trials.
\part Use the \verb+kmeans+ clustering function to \part Use the \verb+kmeans+ clustering function to
discriminate different types of eye-movements. Try clustering identify fixation points. Manually select a good number of cluster
using eye velocitiy and acceleration. centroids.
\end{parts} \end{parts}
\end{questions} \end{questions}

View File

@ -1,4 +1,4 @@
\documentclass[addpoints,10pt]{exam} \documentclass[addpoints,11pt]{exam}
\usepackage{url} \usepackage{url}
\usepackage{color} \usepackage{color}
\usepackage{hyperref} \usepackage{hyperref}
@ -9,7 +9,7 @@
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014
-- 11/06/2014} -- 11/06/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{} \firstpagefooter{}{}{{\bf Supervisor:} Jan Benda}
\runningfooter{}{}{} \runningfooter{}{}{}
\pointsinmargin \pointsinmargin
\bracketedpoints \bracketedpoints
@ -31,7 +31,7 @@
% captionpos=t, % captionpos=t,
xleftmargin=2em, xleftmargin=2em,
xrightmargin=1em, xrightmargin=1em,
% aboveskip=10pt, % aboveskip=11pt,
%title=\lstname, %title=\lstname,
% title={\protect\filename@parse{\lstname}\protect\filename@base.\protect\filename@ext} % title={\protect\filename@parse{\lstname}\protect\filename@base.\protect\filename@ext}
} }
@ -63,19 +63,18 @@
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)?
\begin{parts} The neuron is implemented in the file \texttt{lifboltzmanspikes.m}.
\part 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;
Dnoise = 1.0; Dnoise = 1.0;
imax = 25.0; imax = 25.0;
ithresh = 10.0; ithresh = 10.0;
slope=0.2; slope=0.2;
input = 10.0; input = 10.0;
spikes = lifboltzmanspikes( trials, input, tmax, Dnoise, imax, ithresh, slope ); spikes = lifboltzmanspikes( trials, input, tmax, Dnoise, imax, ithresh, slope );
\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} elements, each being a vector
of spike times (in seconds) computed for a duration of \texttt{tmax} seconds. of spike times (in seconds) computed for a duration of \texttt{tmax} seconds.
@ -83,6 +82,9 @@
For the two inputs use $I_1=10$ and $I_2=I_1 + 1$. For the two inputs use $I_1=10$ and $I_2=I_1 + 1$.
\begin{parts}
\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 input. That is,
@ -99,15 +101,14 @@
the two stimuli can be distinguished based on the spike the two stimuli can be distinguished based on the spike
counts. Plot the dependence of this measure as a function of the observation time $W$. counts. Plot the dependence of this measure as a function of the observation time $W$.
For which slopes can the two stimuli perfectly discriminated? For which slopes can the two stimuli be well discriminated?
Hint: A possible readout is to set a threshold $n_{thresh}$ for \underline{Hint:} A possible readout is to set a threshold
the observed spike count. Any response smaller than the threshold $n_{thresh}$ for the observed spike count. Any response smaller
assumes that the stimulus was $I_1$, any response larger than the than the threshold assumes that the stimulus was $I_1$, any
threshold assumes that the stimulus was $I_2$. What is the response larger than the threshold assumes that the stimulus was
probability that the stimulus was indeed $I_1$ or $I_2$, $I_2$. Find the threshold $n_{thresh}$ that results in the best
respectively? Find the threshold $n_{thresh}$ that discrimination performance.
results in the best 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?

Binary file not shown.

View File

@ -1,4 +1,4 @@
\documentclass[addpoints,10pt]{exam} \documentclass[addpoints,11pt]{exam}
\usepackage{url} \usepackage{url}
\usepackage{color} \usepackage{color}
\usepackage{hyperref} \usepackage{hyperref}
@ -9,7 +9,7 @@
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014
-- 11/06/2014} -- 11/06/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{} \firstpagefooter{}{}{{\bf Supervisor:} Fabian Sinz}
\runningfooter{}{}{} \runningfooter{}{}{}
\pointsinmargin \pointsinmargin
\bracketedpoints \bracketedpoints
@ -39,25 +39,16 @@
process---for which each spike is independent of every other---has a process---for which each spike is independent of every other---has a
Fano factor of one. Fano factor of one.
The table contains spike counts from a neuron measured in twelve The accompanying file contains two vectors with spike counts from
trials. two neurons each measured in a time window of 1s.
\begin{center}
\begin{tabular}{cccc}
\multicolumn{4}{c}{\bf number of spikes} \\ \hline\\
36 & 28 & 38 & 35\\
32 & 30 & 35 & 29\\
29 & 24 & 26 & 34
\end{tabular}
\end{center}
\begin{parts} \begin{parts}
\part Plot the spike counts of both neurons appropriately.
\part Use {\em Eden, U. T., \& Kramer, M. (2010). Drawing \part Use {\em Eden, U. T., \& Kramer, M. (2010). Drawing
inferences from Fano factor calculations. Journal of inferences from Fano factor calculations. Journal of
neuroscience methods, 190(1), 149--152} to construct a test that neuroscience methods, 190(1), 149--152} to construct a test that
uses the Fano factor as test statistic and tests against the Null uses the Fano factor as test statistic and tests against the Null
hypothesis that the spike counts come from a Poisson process. hypothesis that the spike counts come from a Poisson process.
\part Plot the spike counts appropriately.
\part Implement the test and use it on the data above. \part Implement the test and use it on the data above.
\end{parts} \end{parts}

View File

@ -1,4 +1,4 @@
\documentclass[addpoints,10pt]{exam} \documentclass[addpoints,11pt]{exam}
\usepackage{url} \usepackage{url}
\usepackage{color} \usepackage{color}
\usepackage{hyperref} \usepackage{hyperref}
@ -9,7 +9,7 @@
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014
-- 11/06/2014} -- 11/06/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{} \firstpagefooter{}{}{{\bf Supervisor:} Jan Benda}
\runningfooter{}{}{} \runningfooter{}{}{}
\pointsinmargin \pointsinmargin
\bracketedpoints \bracketedpoints
@ -31,7 +31,7 @@
% captionpos=t, % captionpos=t,
xleftmargin=2em, xleftmargin=2em,
xrightmargin=1em, xrightmargin=1em,
% aboveskip=10pt, % aboveskip=11pt,
%title=\lstname, %title=\lstname,
% title={\protect\filename@parse{\lstname}\protect\filename@base.\protect\filename@ext} % title={\protect\filename@parse{\lstname}\protect\filename@base.\protect\filename@ext}
} }
@ -62,32 +62,33 @@
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)?
\begin{parts} The neuron is implemented in the file \texttt{lifadaptspikes.m}.
\part 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;
input = 65.0; input = 65.0;
Dnoise = 0.1; Dnoise = 0.1;
adapttau = 0.2; adapttau = 0.2;
adaptincr = 0.5; 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} elements, each being a vector
of spike times (in seconds) computed for a duration of \texttt{tmax} seconds. 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}
input = 65.0; % I_1 input = 65.0; % I_1
input = 75.0; % I_2 input = 75.0; % I_2
\end{lstlisting} \end{lstlisting}
Show two raster plots for the responses to the two differrent stimuli. \begin{parts}
\part
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 differrent stimuli. How do they depend on the observation time $W$ responses to the two different stimuli. How do they depend on the observation time $W$
(use values between 1\,ms and 1\,s)? (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 that quantifies how well
@ -96,12 +97,11 @@
For which observation times can the two stimuli perfectly discriminated? For which observation times can the two stimuli perfectly discriminated?
Hint: A possible readout is to set a threshold $n_{thresh}$ for \underline{Hint:} A possible readout is to set a threshold
the observed spike count. Any response smaller than the threshold $n_{thresh}$ for the observed spike count. Any response smaller
assumes that the stimulus was $I_1$, any response larger than the than the threshold assumes that the stimulus was $I_1$, any
threshold assumes that the stimulus was $I_2$. What is the response larger than the threshold assumes that the stimulus was
probability that the stimulus was indeed $I_1$ or $I_2$, $I_2$. For a given $W$ find the threshold $n_{thresh}$ that
respectively? 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?

View File

@ -1,4 +1,4 @@
\documentclass[addpoints,10pt]{exam} \documentclass[addpoints,11pt]{exam}
\usepackage{url} \usepackage{url}
\usepackage{color} \usepackage{color}
\usepackage{hyperref} \usepackage{hyperref}
@ -9,7 +9,7 @@
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014
-- 11/06/2014} -- 11/06/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{} \firstpagefooter{}{}{{\bf Supervisor:} Jan Benda}
\runningfooter{}{}{} \runningfooter{}{}{}
\pointsinmargin \pointsinmargin
\bracketedpoints \bracketedpoints
@ -31,7 +31,7 @@
% captionpos=t, % captionpos=t,
xleftmargin=2em, xleftmargin=2em,
xrightmargin=1em, xrightmargin=1em,
% aboveskip=10pt, % aboveskip=11pt,
%title=\lstname, %title=\lstname,
% title={\protect\filename@parse{\lstname}\protect\filename@base.\protect\filename@ext} % title={\protect\filename@parse{\lstname}\protect\filename@base.\protect\filename@ext}
} }
@ -59,25 +59,25 @@
Explore the dependence of interspike interval correlations on the firing rate, Explore the dependence of interspike interval correlations on the firing rate,
adaptation time constant and noise level. adaptation time constant and noise level.
\begin{parts} The neuron is a neuron with an adaptation current.
\part The neuron is a neuron with an adaptation current.
It is implemented in the file \texttt{lifadaptspikes.m}. Call it It is implemented in the file \texttt{lifadaptspikes.m}. Call it
with the following parameters: with the following parameters:
\begin{lstlisting} \begin{lstlisting}
trials = 10; trials = 10;
tmax = 50.0; tmax = 50.0;
input = 10.0; % the input I input = 10.0; % the input I
Dnoise = 1e-2; % noise strength Dnoise = 1e-2; % noise strength
adapttau = 0.1; % adaptation time constant in seconds adapttau = 0.1; % adaptation time constant in seconds
adaptincr = 0.5; % adaptation strength adaptincr = 0.5; % adaptation strength
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} elements, each being a vector
of spike times (in seconds) computed for a duration of \texttt{tmax} seconds. of spike times (in seconds) computed for a duration of \texttt{tmax} seconds.
The input is set via the \texttt{input} variable, the noise strength via \texttt{Dnoise}, The input is set via the \texttt{input} variable, the noise strength via \texttt{Dnoise},
and the adaptation time constant via \texttt{adapttau}. and the adaptation time constant via \texttt{adapttau}.
\begin{parts}
\part Measure the intensity-response curve of the neuron, that is the mean firing rate \part Measure the intensity-response curve of the neuron, that is the mean firing rate
as a function of the input for a range of inputs from 0 to 120. as a function of the input for a range of inputs from 0 to 120.

View File

@ -1,4 +1,4 @@
\documentclass[addpoints,10pt]{exam} \documentclass[addpoints,11pt]{exam}
\usepackage{url} \usepackage{url}
\usepackage{color} \usepackage{color}
\usepackage{hyperref} \usepackage{hyperref}
@ -9,7 +9,7 @@
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014
-- 11/06/2014} -- 11/06/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{} \firstpagefooter{}{}{{\bf Supervisor:} Jan Benda}
\runningfooter{}{}{} \runningfooter{}{}{}
\pointsinmargin \pointsinmargin
\bracketedpoints \bracketedpoints
@ -31,7 +31,7 @@
% captionpos=t, % captionpos=t,
xleftmargin=2em, xleftmargin=2em,
xrightmargin=1em, xrightmargin=1em,
% aboveskip=10pt, % aboveskip=11pt,
%title=\lstname, %title=\lstname,
% title={\protect\filename@parse{\lstname}\protect\filename@base.\protect\filename@ext} % title={\protect\filename@parse{\lstname}\protect\filename@base.\protect\filename@ext}
} }
@ -72,7 +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)$ is the so called diffusion coefficient. % $D=\textrm{var}(T)/(2\mu^3)$
$D$ 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}
@ -91,35 +92,34 @@
\end{equation} \end{equation}
with $\delta=\mu/\tau$. with $\delta=\mu/\tau$.
\begin{parts} The two neurons are implemented in the files \texttt{pifouspikes.m}
\part The two neurons are implemented in the files \texttt{pifouspikes.m}
and \texttt{lifouspikes.m}. and \texttt{lifouspikes.m}.
Call them with the following parameters: Call them with the following parameters:
\begin{lstlisting} \begin{lstlisting}
trials = 10; trials = 10;
tmax = 50.0; tmax = 50.0;
input = 10.0; % the input I 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 ); spikes = pifouspikes( 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{spikes} is a cell array with \texttt{trials} elements, each being a vector
of spike times (in seconds) computed for a duration of \texttt{tmax} seconds. of spike times (in seconds) computed for a duration of \texttt{tmax} seconds.
The input is set via the \texttt{input} variable. The input is set via the \texttt{input} variable.
\begin{parts}
\part Find for both model neurons the inputs $I_i$ required to make the fire with a mean rate \part For both model neurons find the inputs $I_i$ required to
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
eq.~(\ref{invgauss}) by measuring their parameters from the eq.~(\ref{invgauss}) by measuring their parameters from the
interspike intervals. How well do theu describe the real interspike intervals. How well do they describe the real
distributions for the different conditions? distributions for the different conditions?
\part Also fit eq.~(\ref{pcn}) to the data. Here you need to apply a non-linear fit algorithm. \part Also fit eq.~(\ref{pcn}) to the data using maximum (log)-likelihood.
How well does this function describe the data? How well does this function describe the data?

View File

@ -1,4 +1,4 @@
\documentclass[addpoints,10pt]{exam} \documentclass[addpoints,11pt]{exam}
\usepackage{url} \usepackage{url}
\usepackage{color} \usepackage{color}
\usepackage{hyperref} \usepackage{hyperref}
@ -9,7 +9,7 @@
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014
-- 11/06/2014} -- 11/06/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{} \firstpagefooter{}{}{{\bf Supervisor:} Fabian Sinz}
\runningfooter{}{}{} \runningfooter{}{}{}
\pointsinmargin \pointsinmargin
\bracketedpoints \bracketedpoints
@ -51,8 +51,8 @@
\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.
\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; the situation in which find out by generating your own dataset which naturally should
the information is maximal is pretty straightforward)? yield maximal information)?
\part Use bootstrapping to compute the $95\%$ confidence interval \part Use bootstrapping to compute the $95\%$ confidence interval
for the mutual information estimate in that dataset. for the mutual information estimate in that dataset.
\end{parts} \end{parts}

View File

@ -1,4 +1,4 @@
\documentclass[addpoints,10pt]{exam} \documentclass[addpoints,11pt]{exam}
\usepackage{url} \usepackage{url}
\usepackage{color} \usepackage{color}
\usepackage{hyperref} \usepackage{hyperref}
@ -9,7 +9,7 @@
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014
-- 11/06/2014} -- 11/06/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{} \firstpagefooter{}{}{{\bf Supervisor:} Jan Benda}
\runningfooter{}{}{} \runningfooter{}{}{}
\pointsinmargin \pointsinmargin
\bracketedpoints \bracketedpoints
@ -31,7 +31,7 @@
% captionpos=t, % captionpos=t,
xleftmargin=2em, xleftmargin=2em,
xrightmargin=1em, xrightmargin=1em,
% aboveskip=10pt, % aboveskip=11pt,
%title=\lstname, %title=\lstname,
% title={\protect\filename@parse{\lstname}\protect\filename@base.\protect\filename@ext} % title={\protect\filename@parse{\lstname}\protect\filename@base.\protect\filename@ext}
} }
@ -60,21 +60,21 @@
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?
\begin{parts} The neuron is implemented in the file \texttt{lifspikes.m}.
\part The neuron is implemented in the file \texttt{lifspikes.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;
input = 10.0; % the input I input = 10.0; % the input I
Dnoise = 1.0; % noise strength Dnoise = 1.0; % noise strength
spikes = lifspikes( trials, input, tmax, Dnoise ); spikes = lifspikes( trials, input, tmax, Dnoise );
\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} elements, each being a vector
of spike times (in seconds) computed for a duration of \texttt{tmax} seconds. of spike times (in seconds) computed for a duration of \texttt{tmax} seconds.
The input is set via the \texttt{input} variable, the noise strength via \texttt{Dnoise}. The input is set via the \texttt{input} variable, the noise strength via \texttt{Dnoise}.
\begin{parts}
\part First set the noise \texttt{Dnoise=0} (no noise). Compute and plot the firing rate \part First set the noise \texttt{Dnoise=0} (no noise). Compute and plot the firing rate
as a function of the input for inputs ranging from 0 to 20. as a function of the input for inputs ranging from 0 to 20.

View File

@ -1,4 +1,4 @@
\documentclass[addpoints,10pt]{exam} \documentclass[addpoints,11pt]{exam}
\usepackage{url} \usepackage{url}
\usepackage{color} \usepackage{color}
\usepackage{hyperref} \usepackage{hyperref}
@ -9,7 +9,7 @@
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014
-- 11/06/2014} -- 11/06/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{} \firstpagefooter{}{}{{\bf Supervisor:} Fabian Sinz}
\runningfooter{}{}{} \runningfooter{}{}{}
\pointsinmargin \pointsinmargin
\bracketedpoints \bracketedpoints
@ -33,14 +33,14 @@
\begin{questions} \begin{questions}
\question The accompanying data {\tt Neuron22.mat} stores a single \question The accompanying data {\tt Neuron22.mat} stores a single
data matrix {\tt data\_unsorted} containing spike from a neuron in data matrix {\tt data\_unsorted} containing spikes from a neuron in
macaque prefrontal cortex. The task of the monkey was to macaque prefrontal cortex (data courtesy of Prof. Nieder). The task
discriminate point sets with 1 to 4 points. The first column of the monkey was to discriminate point-sets with 1 to 4 points. The
contains the number of points shown plus one. The remaining columns first column contains the number of points shown plus one. The
contain the spike response across 1300ms. During the first 500ms the remaining columns contain the spike response across 1300ms. During
monkey was fixating a target. The next 800ms the stimulus was the first 500ms the monkey was fixating a target. The next 800ms the
shown. This was followed by 1000ms delay time before the monkey was stimulus was shown. This was followed by 1000ms delay time before
allowed to respond. the monkey was allowed to respond.
\begin{parts} \begin{parts}
\part Plot the data in an appropriate way. \part Plot the data in an appropriate way.

View File

@ -9,7 +9,7 @@
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014
-- 11/06/2014} -- 11/06/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{} \firstpagefooter{}{}{{\bf Supervisor:} Jan Grewe}
\runningfooter{}{}{} \runningfooter{}{}{}
\pointsinmargin \pointsinmargin
\bracketedpoints \bracketedpoints
@ -39,25 +39,25 @@ of the stimulus \textbf{I}ntensity.
\question In the accompanying datasets you find the \question In the accompanying datasets you find the
\textit{spike\_times} of an P-unit electrorecptor of the weakly \textit{spike\_times} of an P-unit electrorecptor of the weakly
electric fish \textit{Apteronotus leptorhynchus} to a stimulus of a electric fish \textit{Apteronotus leptorhynchus} to a stimulus of a
certain intensity, i.e. the \textit{contrast}. The contrast is also certain intensity, i.e. the \textit{contrast}.
part of the file name itself.
\begin{parts} \begin{parts}
\part Estimate for each stimulus intensity the average response \part For each stimulus intensity estimate the average response
(PSTH) and plot it. You will see that there are three parts. (i) (PSTH) and plot it. You will see that there are three parts. (i)
The first 200 ms is the baseline (no stimulus) activity. (ii) During The first 200 ms is the baseline (no stimulus) activity. (ii)
the next 1000 ms the stimulus was switched on. (iii) After stimulus During the next 1000 ms the stimulus was switched on. (iii) After
offset the neuronal activity was recorded for further 825 ms. stimulus offset the neuronal activity was recorded for further 825
ms.
\part Extract the neuron's activity in the first 50 ms after stimulus onset \part Extract the neuron's activity in the first 50 ms after stimulus onset
and plot it against the stimulus intensity, respectively the and plot it against the stimulus intensity, respectively the
contrast, in an appropriate way. contrast, in an appropriate way.
\part Fit a Boltzmann function to the FI-curve. The Boltzmann function \part Fit a Boltzmann function to the FI-curve. The Boltzmann function
is defined as: is defined as:
\begin{equation} \begin{equation}
y=\frac{\alpha-\beta}{1+e^{(x-x_0)/dx}}+\beta, y=\frac{\alpha-\beta}{1+e^{(x-x_0)/\Delta x}}+\beta,
\end{equation} \end{equation}
where $\alpha$ is the starting firing rate, $\beta$ the saturation where $\alpha$ is the starting firing rate, $\beta$ the saturation
firing rate, $x$ the current stimulus intensity, $x_0$ starting firing rate, $x$ the current stimulus intensity, $x_0$ starting
stimulus intensity, and $dx$ a measure of the slope. stimulus intensity, and $\Delta x$ a measure of the slope.
\part Plot the fit into the data. \part Plot the fit into the data.
\end{parts} \end{parts}
\end{questions} \end{questions}

View File

@ -0,0 +1,11 @@
latex:
pdflatex *.tex > /dev/null
pdflatex *.tex > /dev/null
pdflatex *.tex > /dev/null
clean:
rm -rf *.log *.aux *.zip *.out auto *.bbl *.blg
rm -f `basename *.tex .tex`.pdf
zip: latex
zip `basename *.tex .tex`.zip *.pdf *.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 KiB

View File

@ -0,0 +1,61 @@
\documentclass[addpoints,11pt]{exam}
\usepackage{url}
\usepackage{color}
\usepackage{hyperref}
\pagestyle{headandfoot}
\runningheadrule
\firstpageheadrule
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014
-- 11/06/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{{\bf Supervisor:} Fabian Sinz}
\runningfooter{}{}{}
\pointsinmargin
\bracketedpoints
%\printanswers
%\shadedsolutions
\begin{document}
%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%%
\sffamily
% \begin{flushright}
% \gradetable[h][questions]
% \end{flushright}
\begin{center}
\input{../disclaimer.tex}
\end{center}
%%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%%
In you zip file you find a natural image called {\tt natimg.jpg}.
\begin{questions}
\question Load the image and extract all pixels as three dimensional
vectors (red, green, and blue channel).
\question Perform a principal component analysis on these
three-dimensional vectors.
\question Try to find an interpretation of the principal components
you find in terms of colors. Find a good way to visualize this.
\question What could be the biological significance of that (\cite{BG} can
give you a clue)?
\end{questions}
\begin{thebibliography}{1}
\bibitem{BG} Buchsbaum, G., \& Gottschalk, A. (1983). Trichromacy,
opponent colours coding and optimum colour information transmission
in the retina. Proceedings of the Royal Society of London. Series B,
Containing Papers of a Biological Character. Royal Society (Great
Britain), 220(1218), 89113.
\end{thebibliography}
\end{document}

View File

@ -1,4 +1,4 @@
\documentclass[addpoints,10pt]{exam} \documentclass[addpoints,11pt]{exam}
\usepackage{url} \usepackage{url}
\usepackage{color} \usepackage{color}
\usepackage{hyperref} \usepackage{hyperref}
@ -9,7 +9,7 @@
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014
-- 11/06/2014} -- 11/06/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{} \firstpagefooter{}{}{{\bf Supervisor:} Fabian Sinz}
\runningfooter{}{}{} \runningfooter{}{}{}
\pointsinmargin \pointsinmargin
\bracketedpoints \bracketedpoints

View File

@ -1,4 +1,4 @@
\documentclass[addpoints,10pt]{exam} \documentclass[addpoints,11pt]{exam}
\usepackage{url} \usepackage{url}
\usepackage{color} \usepackage{color}
\usepackage{hyperref} \usepackage{hyperref}
@ -9,7 +9,7 @@
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014
-- 11/06/2014} -- 11/06/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{} \firstpagefooter{}{}{{\bf Supervisor:} Fabian Sinz}
\runningfooter{}{}{} \runningfooter{}{}{}
\pointsinmargin \pointsinmargin
\bracketedpoints \bracketedpoints
@ -48,7 +48,7 @@
appropriate size and compute the average Fourier amplitude appropriate size and compute the average Fourier amplitude
spectrum of the spike response. Plot the result in an appropriate spectrum of the spike response. Plot the result in an appropriate
way. way.
\part Determine whether you can find peas in the amplitude \part Determine whether you can find peak in the amplitude
spectrum at the fundamental frequency of the EOD and/or the spectrum at the fundamental frequency of the EOD and/or the
stimulus and/or their difference. stimulus and/or their difference.
\end{parts} \end{parts}

View File

@ -9,7 +9,7 @@
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014
-- 11/06/2014} -- 11/06/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{} \firstpagefooter{}{}{{\bf Supervisor:} Jan Grewe}
\runningfooter{}{}{} \runningfooter{}{}{}
\pointsinmargin \pointsinmargin
\bracketedpoints \bracketedpoints
@ -47,17 +47,17 @@ of the stimulus \textbf{I}ntensity.
The first 200 ms is the baseline (no stimulus) activity. (ii) During The first 200 ms is the baseline (no stimulus) activity. (ii) During
the next 1000 ms the stimulus was switched on. (iii) After stimulus the next 1000 ms the stimulus was switched on. (iii) After stimulus
offset the neuronal activity was recorded for further 825 ms. offset the neuronal activity was recorded for further 825 ms.
\part Extract the neuron's activity in the first 50 ms after stimulus onset \part Extract the neuron's activity in the last 200 ms before
and plot it against the stimulus intensity, respectively the stimulus offset and plot it against the stimulus intensity or the
contrast, in an appropriate way. contrast, respectively.
\part Fit a Boltzmann function to the FI-curve. The Boltzmann function \part Fit a Boltzmann function to the FI-curve. The Boltzmann function
is defined as: is defined as:
\begin{equation} \begin{equation}
y=\frac{\alpha-\beta}{1+e^{(x-x_0)/dx}}+\beta, y=\frac{\alpha-\beta}{1+e^{(x-x_0)/\Delta x}}+\beta,
\end{equation} \end{equation}
where $\alpha$ is the starting firing rate, $\beta$ the saturation where $\alpha$ is the starting firing rate, $\beta$ the saturation
firing rate, $x$ the current stimulus intensity, $x_0$ starting firing rate, $x$ the current stimulus intensity, $x_0$ starting
stimulus intensity, and $dx$ a measure of the slope. stimulus intensity, and $\Delta x$ a measure of the slope.
\end{parts} \end{parts}
\end{questions} \end{questions}

View File

@ -9,7 +9,7 @@
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014
-- 11/06/2014} -- 11/06/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{} \firstpagefooter{}{}{{\bf Supervisor:} Jan Grewe}
\runningfooter{}{}{} \runningfooter{}{}{}
\pointsinmargin \pointsinmargin
\bracketedpoints \bracketedpoints
@ -49,12 +49,13 @@ reconstruct the stimulus a neuron has been stimulated with.
\end{equation} \end{equation}
with $N$ the number of data points, $x_i$ the current value and with $N$ the number of data points, $x_i$ the current value and
$\bar{x}$, the average of all $x$. $\bar{x}$, the average of all $x$.
\part Analyze the robustness of the reconstruction. Estimate \part Analyze the robustness of the reconstruction: Estimate
the STA with less and less data and estimate the reconstruction the STA with less and less data and estimate the reconstruction
error. error.
\part Plot the reconstruction error as a function of the data \part Plot the reconstruction error as a function of the data
amount used to estimate the STA. amount used to estimate the STA.
\part Do the same for the pyramidal neuron, what do you observe? \part Repeat the above steps for the pyramidal neuron, what do you
observe?
\end{parts} \end{parts}
\end{questions} \end{questions}

View File

@ -1,4 +1,4 @@
\documentclass[addpoints,10pt]{exam} \documentclass[addpoints,11pt]{exam}
\usepackage{url} \usepackage{url}
\usepackage{color} \usepackage{color}
\usepackage{hyperref} \usepackage{hyperref}

View File

@ -9,7 +9,7 @@
\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 \firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014
-- 11/06/2014} -- 11/06/2014}
%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} %\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014}
\firstpagefooter{}{}{} \firstpagefooter{}{}{{\bf Supervisor:} Jan Grewe}
\runningfooter{}{}{} \runningfooter{}{}{}
\pointsinmargin \pointsinmargin
\bracketedpoints \bracketedpoints
@ -35,8 +35,8 @@ P-unit electrorecptors are driven by the fish's self-generated field,
the EOD. In this project you have to quantify the strength of this the EOD. In this project you have to quantify the strength of this
coulpling using the \textbf{vector strength}: coulpling using the \textbf{vector strength}:
\begin{equation} \begin{equation}
VS = \sqrt{\left(\frac{1}{n}\sum_{i=1}^{n}cos VS = \sqrt{\left(\frac{1}{n}\sum_{i=1}^{n}\cos
\alpha_i\right)^2 + \left(\frac{1}{n}\sum_{i = 1}^{n} sin \alpha_i \alpha_i\right)^2 + \left(\frac{1}{n}\sum_{i = 1}^{n} \sin \alpha_i
\right)^2}, \right)^2},
\end{equation} \end{equation}
with $n$ the number of spikes and $\alpha_i$ the timing of the each with $n$ the number of spikes and $\alpha_i$ the timing of the each