\documentclass[12pt]{book}

\input{../../header}

\lstset{inputpath=../code}
\graphicspath{{figures/}}

\typein[\pagenumber]{Number of first page}
\typein[\chapternumber]{Chapter number}
\setcounter{page}{\pagenumber}
\setcounter{chapter}{\chapternumber}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document} 

\include{regression}

\subsection{Start with one-dimensional problem!}
\begin{itemize}
\item Just the root mean square as a function of the slope
\item 1-d gradient
\item 1-d gradient descend
\item Homework is to do the 2d problem!
\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}

\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}


\end{document}
