diff --git a/plotting/lecture/plotting-chapter.tex b/plotting/lecture/plotting-chapter.tex index 022eaf1..4dd0a9d 100644 --- a/plotting/lecture/plotting-chapter.tex +++ b/plotting/lecture/plotting-chapter.tex @@ -28,6 +28,8 @@ \subsection{Polar plot} +\subsection{print instead of saveas????} + \subsection{Movies and animations} \section{TODO} diff --git a/projects/header.tex b/projects/header.tex index 4d4fe9b..690de17 100644 --- a/projects/header.tex +++ b/projects/header.tex @@ -7,7 +7,7 @@ %%%%% layout %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[left=20mm,right=20mm,top=25mm,bottom=25mm]{geometry} \pagestyle{headandfoot} -\header{{\bfseries\large Scientific Computing}}{{\bfseries\large Project: \ptitle}}{{\bfseries\large Januar 18th, 2018}} +\header{\textbf{\large Scientific Computing Project: \ptitle}}{}{\textbf{\large January 18th, 2018}} \runningfooter{}{\thepage}{} \setlength{\baselineskip}{15pt} @@ -15,6 +15,8 @@ \setlength{\parskip}{0.3cm} \renewcommand{\baselinestretch}{1.15} +\setcounter{secnumdepth}{-1} + %%%%% listings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{listings} \lstset{ diff --git a/projects/instructions.tex b/projects/instructions.tex index 63ddbec..d68dd46 100644 --- a/projects/instructions.tex +++ b/projects/instructions.tex @@ -1,31 +1,31 @@ \setlength{\fboxsep}{2ex} -\fbox{\parbox{1\linewidth}{\small +\fbox{\parbox{0.95\linewidth}{\small - {\bf Evaluation criteria:} + \textbf{Evaluation criteria:} Each project has three elements that are graded: (i) the code, - (ii) the slides/figures, and (iii) the presentation. + (ii) the quality of the figures, and (iii) the presentation (see below). \vspace{1ex} - {\bf Dates:} + \textbf{Dates:} - The {\bf code} and the {\bf presentation} should be uploaded to + The code and the presentation should be uploaded to ILIAS at latest on Sunday, February 4th, 23:59h. We will store all presentations on one computer to allow fast transitions between talks. The presentations start on Monday, February 5th at 9:15h. \vspace{1ex} - {\bf Files:} + \textbf{Files:} Please hand in your presentation as a pdf file. Bundle everything (the pdf, the code, and the data) into a {\em single} zip-file. \vspace{1ex} - {\bf Code:} + \textbf{Code:} - The {\bf code} should be executable without any further + The code should be executable without any further adjustments from our side. A single \texttt{main.m} script should coordinate the analysis by calling functions and sub-scripts and should produce the {\em same} figures @@ -43,17 +43,15 @@ \vspace{1ex} - {\bf Presentation:} + \textbf{Presentation:} - The {\bf presentation} should be {\em at most} 10min long and be - held in English. In the presentation you should (i) briefly - describe the problem, (ii) present figures introducing, showing, - and discussing your results, and (iii) explain how you solved - the problem algorithmically (don't show your entire code). All - data-related figures you show in the presentation should be - produced by your program --- no editing or labeling by - PowerPoint or other software. It is always a good idea to - illustrate the problem with basic plots of the raw-data. Make - sure the axis labels are large enough! + The presentation should be {\em at most} 10min long and be held + in English. In the presentation you should present figures + introducing, explaining, showing, and discussing your data, + methods, and results. All data-related figures you show in the + presentation should be produced by your program --- no editing + or labeling by PowerPoint or other software. It is always a good + idea to illustrate the problem with basic plots of the + raw-data. Make sure the axis labels are large enough! }} diff --git a/projects/project_adaptation_fit/adaptation_fit.tex b/projects/project_adaptation_fit/adaptation_fit.tex index 13ea510..24d4355 100644 --- a/projects/project_adaptation_fit/adaptation_fit.tex +++ b/projects/project_adaptation_fit/adaptation_fit.tex @@ -11,10 +11,10 @@ %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% -\section*{Estimating the adaptation time-constant.} +\section{Estimating the adaptation time-constant} 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 -process is called adaptation and is ubiquitous. Your task here is to +process is called adaptation. Your task here is to estimate the time-constant of the firing-rate adaptation in P-unit electroreceptors of the weakly electric fish \textit{Apteronotus leptorhynchus}. @@ -26,27 +26,41 @@ electroreceptors of the weakly electric fish \textit{Apteronotus in the file. The contrast of the stimulus is a measure relative to the amplitude of fish's field, it has no unit. The data is sampled with 20\,kHz sampling frequency and spike times are given in - milliseconds relative to the stimulus onset. + milliseconds (not seconds!) relative to the stimulus onset. \begin{parts} - \part Estimate for each stimulus intensity the 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 - next 1000\,ms the stimulus was switched on. (iii) After stimulus - offset the neuronal activity was recorded for further 825\,ms. + \part Estimate for each stimulus intensity the PSTH. You will see + that there are three parts: (i) The first 200\,ms is the baseline + (no stimulus) activity. (ii) During the next 1000\,ms the stimulus + was switched on. (iii) After stimulus offset the neuronal activity + was recorded for further 825\,ms. Find an appropriate bin-width + for the PSTH. + \part Estimate the adaptation time-constant for both the stimulus - on- and offset. To do this fit an exponential function to the - data. For the decay use: - \begin{equation} - f_{A,\tau,y_0}(t) = y_0 + A \cdot e^{-\frac{t}{\tau}}, - \end{equation} - where $y_0$ the offset, $A$ the amplitude, $t$ the time, $\tau$ - the time-constant. - For the increasing phases use an exponential of the form: + on- and offset. To do this fit an exponential function + $f_{A,\tau,y_0}(t)$ to appropriate regions of the data: \begin{equation} - f_{A,\tau, y_0}(t) = y_0 + A \cdot \left(1 - e^{-\frac{t}{\tau}}\right ), + f_{A,\tau,y_0}(t) = A \cdot e^{-\frac{t}{\tau}} + y_0, \end{equation} - \part Plot the best fits into the data. - \part Plot the estimated time-constants as a function of stimulus intensity. + where $t$ is time, $A$ the (positive or negative) amplitude of the + exponential decay, $\tau$ the adaptation time-constant, and $y_0$ + an offset. + + Before you do the fitting, familiarize yourself with the three + parameter of the exponential function. What is the value of + $f_{A,\tau,y_0}(t)$ at $t=0$? What is the value for large times? How does + $f_{A,\tau,y_0}(t)$ change if you change either of the parameter? + + Which of the parameter could you directly estimate from the data + (without fitting)? + + How could you get good estimates for the other parameter? + + Do the fit and show the resulting exponential function together + with the data. + + \part Do the estimated time-constants depend on stimulus intensity? + + Use an appropriate statistical test to support your observation. \end{parts} \end{questions} diff --git a/projects/project_onset_fi/Makefile b/projects/project_ficurves/Makefile similarity index 100% rename from projects/project_onset_fi/Makefile rename to projects/project_ficurves/Makefile diff --git a/projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_-14.mat b/projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_-14.mat similarity index 100% rename from projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_-14.mat rename to projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_-14.mat diff --git a/projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_-18.mat b/projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_-18.mat similarity index 100% rename from projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_-18.mat rename to projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_-18.mat diff --git a/projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_-2.mat b/projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_-2.mat similarity index 100% rename from projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_-2.mat rename to projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_-2.mat diff --git a/projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_-6.mat b/projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_-6.mat similarity index 100% rename from projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_-6.mat rename to projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_-6.mat diff --git a/projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_-9.mat b/projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_-9.mat similarity index 100% rename from projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_-9.mat rename to projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_-9.mat diff --git a/projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_12.mat b/projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_12.mat similarity index 100% rename from projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_12.mat rename to projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_12.mat diff --git a/projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_15.mat b/projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_15.mat similarity index 100% rename from projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_15.mat rename to projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_15.mat diff --git a/projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_2.mat b/projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_2.mat similarity index 100% rename from projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_2.mat rename to projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_2.mat diff --git a/projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_5.mat b/projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_5.mat similarity index 100% rename from projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_5.mat rename to projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_5.mat diff --git a/projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_9.mat b/projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_9.mat similarity index 100% rename from projects/project_onset_fi/data/p_unit_2012-03-30-aa_fi_curve_9.mat rename to projects/project_ficurves/data/p_unit_2012-03-30-aa_fi_curve_9.mat diff --git a/projects/project_ficurves/ficurves.tex b/projects/project_ficurves/ficurves.tex new file mode 100644 index 0000000..7bfba31 --- /dev/null +++ b/projects/project_ficurves/ficurves.tex @@ -0,0 +1,73 @@ +\documentclass[a4paper,12pt,pdftex]{exam} + +\newcommand{\ptitle}{F-I curves} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Grewe}{phone: 29 74588}% +{email: jan.grewe@uni-tuebingen.de} + +\begin{document} + +\input{../instructions.tex} + + +%%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% +\section{Quantifying the responsiveness of a neuron by its F-I curves} +The responsiveness of a neuron is often quantified using an F-I +curve. The F-I curve plots the \textbf{F}iring rate of the neuron as a +function of the stimulus \textbf{I}ntensity. + +\begin{questions} + \question In the accompanying datasets you find the + \textit{spike\_times} of an P-unit electroreceptor of the weakly + electric fish \textit{Apteronotus leptorhynchus} to a stimulus of a + certain intensity, i.e. the \textit{contrast}. The spike times are + given in milliseconds relative to the stimulus onset. + \begin{parts} + \part For each stimulus intensity estimate the average response + (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 next 1000\,ms the stimulus was switched on. (iii) After + stimulus offset the neuronal activity was recorded for further + 825\,ms. + + \part Extract the neuron's activity for every 50\,ms after + stimulus onset and for one 50\,ms slice before stimulus onset. + + For each time slice plot the resulting F-I curve by plotting the + computed firing rates against the corresponding stimulus + intensity, respectively the contrast. + + \part Fit a Boltzmann function to each of the F-I-curves. The + Boltzmann function is a sigmoidal function and is defined as + \begin{equation} + f(x) = \frac{\alpha-\beta}{1+e^{-k(x-x_0)}}+\beta \; . + \end{equation} + $x$ is the stimulus intensity, $\alpha$ is the starting + firing rate, $\beta$ the saturation firing rate, $x_0$ defines the + position of the sigmoid, and $k$ (together with $\alpha-\beta$) + sets the slope. + + Before you do the fitting, familiarize yourself with the four + parameter of the Boltzmann function. What is its value for very + large or very small stimulus intensities? How does the Boltzmann + function change if you change either of the parameter? + + How could you get good initial estimates for the parameter? + + Do the fits and show the resulting Boltzmann functions together + with the corresponding data. + + \part Illustrate how the F-I curves change in time also by means + of the parameter you obtained from the fits with the Boltzmann + function. + + Which parameter stay the same, which ones change with time? + + Support your conclusion with appropriate statistical tests. + + \part Discuss you results with respect to encoding of different + stimulus intensities. + \end{parts} +\end{questions} + +\end{document} diff --git a/projects/project_onset_fi/solution/boltzmannFit.m b/projects/project_ficurves/solution/boltzmannFit.m similarity index 100% rename from projects/project_onset_fi/solution/boltzmannFit.m rename to projects/project_ficurves/solution/boltzmannFit.m diff --git a/projects/project_onset_fi/solution/boltzmannModel.m b/projects/project_ficurves/solution/boltzmannModel.m similarity index 100% rename from projects/project_onset_fi/solution/boltzmannModel.m rename to projects/project_ficurves/solution/boltzmannModel.m diff --git a/projects/project_onset_fi/solution/convolutionRate.m b/projects/project_ficurves/solution/convolutionRate.m similarity index 100% rename from projects/project_onset_fi/solution/convolutionRate.m rename to projects/project_ficurves/solution/convolutionRate.m diff --git a/projects/project_onset_fi/solution/getFICurve.m b/projects/project_ficurves/solution/getFICurve.m similarity index 100% rename from projects/project_onset_fi/solution/getFICurve.m rename to projects/project_ficurves/solution/getFICurve.m diff --git a/projects/project_onset_fi/solution/getFiringRates.m b/projects/project_ficurves/solution/getFiringRates.m similarity index 100% rename from projects/project_onset_fi/solution/getFiringRates.m rename to projects/project_ficurves/solution/getFiringRates.m diff --git a/projects/project_onset_fi/solution/main.m b/projects/project_ficurves/solution/main.m similarity index 100% rename from projects/project_onset_fi/solution/main.m rename to projects/project_ficurves/solution/main.m diff --git a/projects/project_onset_fi/solution/plotAverageResponse.m b/projects/project_ficurves/solution/plotAverageResponse.m similarity index 100% rename from projects/project_onset_fi/solution/plotAverageResponse.m rename to projects/project_ficurves/solution/plotAverageResponse.m diff --git a/projects/project_onset_fi/solution/plotFICurve.m b/projects/project_ficurves/solution/plotFICurve.m similarity index 100% rename from projects/project_onset_fi/solution/plotFICurve.m rename to projects/project_ficurves/solution/plotFICurve.m diff --git a/projects/project_onset_fi/solution/plotFICurveFit.m b/projects/project_ficurves/solution/plotFICurveFit.m similarity index 100% rename from projects/project_onset_fi/solution/plotFICurveFit.m rename to projects/project_ficurves/solution/plotFICurveFit.m diff --git a/projects/project_mutualinfo/mutualinfo.tex b/projects/project_mutualinfo/mutualinfo.tex index f2eef9b..9dda5f7 100644 --- a/projects/project_mutualinfo/mutualinfo.tex +++ b/projects/project_mutualinfo/mutualinfo.tex @@ -19,26 +19,34 @@ object was reported by the subject. \begin{parts} - \part Plot the data appropriately. + \part Plot the data appropriately. + \part Compute a 2-d histogram that shows how often different - combinations of reported and presented came up. + combinations of reported and presented came up. + \part Normalize the histogram such that it sums to one (i.e. make it a probability distribution $P(x,y)$ where $x$ is the presented object and $y$ is the reported object). Compute the probability distributions $P(x)$ and $P(y)$ in the same way. + \part Use that probability distribution to compute the mutual - 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 - actually presented object. + 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 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 find out by generating your own dataset which naturally should yield maximal information)? - \part Use bootstrapping to compute the $95\%$ confidence interval - for the mutual information estimate in that dataset. + + \part Use bootstrapping (permutation test) to compute the $95\%$ + confidence interval for the mutual information estimate in the + dataset from {\tt decisions.mat}. + \end{parts} \end{questions} diff --git a/projects/project_onset_fi/onset_fi.tex b/projects/project_onset_fi/onset_fi.tex deleted file mode 100644 index f8df064..0000000 --- a/projects/project_onset_fi/onset_fi.tex +++ /dev/null @@ -1,47 +0,0 @@ -\documentclass[a4paper,12pt,pdftex]{exam} - -\newcommand{\ptitle}{Onset f-I curve} -\input{../header.tex} -\firstpagefooter{Supervisor: Jan Grewe}{phone: 29 74588}% -{email: jan.grewe@uni-tuebingen.de} - -\begin{document} - -\input{../instructions.tex} - - -%%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% -\section*{Quantifying the responsiveness of a neuron using the F-I curve.} -The responsiveness of a neuron is often quantified using an F-I -curve. The F-I curve plots the \textbf{F}iring rate of the neuron as a -function of the stimulus \textbf{I}ntensity. - -\begin{questions} - \question In the accompanying datasets you find the - \textit{spike\_times} of an P-unit electroreceptor of the weakly - electric fish \textit{Apteronotus leptorhynchus} to a stimulus of a - certain intensity, i.e. the \textit{contrast}. The spike times are - given in milliseconds relative to the stimulus onset. - \begin{parts} - \part For each stimulus intensity estimate the average response - (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 next 1000\,ms the stimulus was switched on. (iii) After - 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 and plot it against the stimulus intensity, - respectively the contrast, in an appropriate way. - \part Fit a Boltzmann function to the FI-curve. The Boltzmann function - is defined as: - \begin{equation} - y=\frac{\alpha-\beta}{1+e^{(x-x_0)/\Delta x}}+\beta, - \end{equation} - where $\alpha$ is the starting firing rate, $\beta$ the saturation - firing rate, $x$ the current stimulus intensity, $x_0$ starting - stimulus intensity, and $\Delta x$ a measure of the slope. - \part Plot the fit into the data. - \end{parts} -\end{questions} - -\end{document} diff --git a/projects/project_serialcorrelation/serialcorrelation.tex b/projects/project_serialcorrelation/serialcorrelation.tex index fd96704..98dc07e 100644 --- a/projects/project_serialcorrelation/serialcorrelation.tex +++ b/projects/project_serialcorrelation/serialcorrelation.tex @@ -16,10 +16,9 @@ \question P-unit electroreceptor afferents of the gymnotiform weakly electric fish \textit{Apteronotus leptorhynchus} are spontaneously active when the fish is not electrically stimulated. - \begin{itemize} - \item How do the firing rates and the serial correlations of the - interspike intervals vary between different cells? - \end{itemize} + + How do the firing rates and the serial correlations of the + interspike intervals vary between different cells? In the file \texttt{baselinespikes.mat} you find two variables: \texttt{cells} is a cell-array with the names of the recorded cells @@ -34,7 +33,7 @@ this project. By just looking on the spike rasters, what are the differences - betwen the cells? + between the cells? \part Compute the firing rate of each cell, i.e. number of spikes per time. @@ -46,15 +45,18 @@ correlations similar betwen the cells? How do they differ? \part Implement a permutation test for computing the significance - at a 1\,\% level of the serial correlations. Illustrate for a few - cells the computed serial correlations and the 1\,\% and 99\,\% - percentile from the permutation test. At which lag are the serial - correlations clearly significant? + at an appropriate significance level of the serial + correlations. Keep in mind that you test the correlations at 10 + different lags. At which lags are the serial correlations + statistically significant? \part Are the serial correlations somehow dependent on the firing rate? Plot the significant correlations against the firing rate. Do you observe any dependence? + + Use an appropriate statistical test to support your observation. + \end{parts} \end{questions} diff --git a/projects/project_steady_state_fi/Makefile b/projects/project_steady_state_fi/Makefile deleted file mode 100644 index a7b3726..0000000 --- a/projects/project_steady_state_fi/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ZIPFILES= - -include ../project.mk diff --git a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-14.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-14.mat deleted file mode 100644 index ae0d020..0000000 Binary files a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-14.mat and /dev/null differ diff --git a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-18.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-18.mat deleted file mode 100644 index 13b040c..0000000 Binary files a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-18.mat and /dev/null differ diff --git a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-2.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-2.mat deleted file mode 100644 index be7a520..0000000 Binary files a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-2.mat and /dev/null differ diff --git a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-6.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-6.mat deleted file mode 100644 index d2ddde6..0000000 Binary files a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-6.mat and /dev/null differ diff --git a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-9.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-9.mat deleted file mode 100644 index d8d910f..0000000 Binary files a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-9.mat and /dev/null differ diff --git a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_12.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_12.mat deleted file mode 100644 index f87fa0c..0000000 Binary files a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_12.mat and /dev/null differ diff --git a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_15.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_15.mat deleted file mode 100644 index 678173f..0000000 Binary files a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_15.mat and /dev/null differ diff --git a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_2.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_2.mat deleted file mode 100644 index 2af9e8b..0000000 Binary files a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_2.mat and /dev/null differ diff --git a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_5.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_5.mat deleted file mode 100644 index f999e5d..0000000 Binary files a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_5.mat and /dev/null differ diff --git a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_9.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_9.mat deleted file mode 100644 index ac3a369..0000000 Binary files a/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_9.mat and /dev/null differ diff --git a/projects/project_steady_state_fi/steady_state_fi.tex b/projects/project_steady_state_fi/steady_state_fi.tex deleted file mode 100644 index abba436..0000000 --- a/projects/project_steady_state_fi/steady_state_fi.tex +++ /dev/null @@ -1,45 +0,0 @@ -\documentclass[a4paper,12pt,pdftex]{exam} - -\newcommand{\ptitle}{Steady-state f-I curve} -\input{../header.tex} -\firstpagefooter{Supervisor: Jan Grewe}{phone: 29 74588}% -{email: jan.grewe@uni-tuebingen.de} - -\begin{document} - -\input{../instructions.tex} - - -%%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% -\section*{Quantifying the responsiveness of a neuron using the F-I curve.} -The responsiveness of a neuron is often quantified using an F-I -curve. The F-I curve plots the \textbf{F}iring rate of the neuron as a function -of the stimulus \textbf{I}ntensity. - -\begin{questions} - \question In the accompanying datasets you find the - \textit{spike\_times} of an P-unit electrorecptor of the weakly - electric fish \textit{Apteronotus leptorhynchus} to a stimulus of a - certain intensity, i.e. the \textit{contrast}. The contrast is also - part of the file name itself. - \begin{parts} - \part Estimate for each stimulus intensity the average response - (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 next 1000 ms the stimulus was switched on. (iii) After stimulus - offset the neuronal activity was recorded for further 825 ms. - \part Extract the neuron's activity in the last 200 ms before - stimulus offset and plot it against the stimulus intensity or the - contrast, respectively. - \part Fit a Boltzmann function to the FI-curve. The Boltzmann function - is defined as: - \begin{equation} - y=\frac{\alpha-\beta}{1+e^{(x-x_0)/\Delta x}}+\beta, - \end{equation} - where $\alpha$ is the starting firing rate, $\beta$ the saturation - firing rate, $x$ the current stimulus intensity, $x_0$ starting - stimulus intensity, and $\Delta x$ a measure of the slope. - \end{parts} -\end{questions} - -\end{document} diff --git a/regression/lecture/regression-chapter.tex b/regression/lecture/regression-chapter.tex index fcb8f16..39b8a29 100644 --- a/regression/lecture/regression-chapter.tex +++ b/regression/lecture/regression-chapter.tex @@ -16,8 +16,25 @@ \input{regression} -Example for fit with matlab functions lsqcurvefit, polyfit +\section{Fitting in practice} + +Fit with matlab functions lsqcurvefit, polyfit + + +\subsection{Non-linear fits} +\begin{itemize} +\item Example that illustrates the Nebenminima Problem (with error surface) +\item You need got initial values for the parameter! +\item Example that fitting gets harder the more parameter yuo have. +\item Try to fix as many parameter before doing the fit. +\item How to test the quality of a fit? Residuals. $\Chi^2$ test. Run-test. +\end{itemize} + +\subsection{Linear fits} +\begin{itemize} +\item Polyfit is easy: unique solution! +\item Example for overfitting with polyfit of a high order (=number of data points) +\end{itemize} -Example for overfitting with polyfit of a high order (=number of data points) \end{document}