diff --git a/text/thesis/02MaterialsAndMethods.tex b/text/thesis/02MaterialsAndMethods.tex index 57cb268..cf98443 100644 --- a/text/thesis/02MaterialsAndMethods.tex +++ b/text/thesis/02MaterialsAndMethods.tex @@ -102,7 +102,7 @@ \State set all negative values in $\mathbf{W}$ to zero \State $i\gets i+1$ \EndWhile - \Return $\mathbf{W}$ + \State\Return $\mathbf{W}$ \end{algorithmic} \caption{Alternating Least Squares in NMF} \label{alg:als} @@ -158,7 +158,7 @@ \label{mm:cm} %TODO: 2 classes: specifity ... The confusion matrix is a visualization of classifications. In it for every class the number of samples classified as each class is shown. This is interesting since it can show bias and give a feeling for similar cases where similar is meant according to the features.\\ - %TODO: figure Convusion matrix + %TODO: figure Confusion matrix \subsection{Regression} Regression is the idea of finding $\beta$ so that $$y= X\beta+\epsilon$$ where X is the $n\times p$ input matrix and y the $n\times 1$ output vector of a system. Having this $\beta$ from given input the output can be predicted.\\ There are different ways to find this $\beta$. One common approach is the \emph{ordinary least squares}-Algorithm. $$\hat{\beta}=\arg\min\limits_{b\in\mathds{R}^p} \left(y-Xb\right)^T\left(y-Xb\right),$$ meaning the chosen $\hat\beta$ is that $b$ which produces the lowest error since $Xb$ should be - besides from noise $\epsilon$ - the same as $y$.\\ @@ -232,8 +232,7 @@ \label{alg:load_bcidat} \end{algorithm} \subsubsection{Signal} - The signal is loaded as matrix of 41 channels (see Table~\ref{tab:channelNames}). All the values are integers %TODO: representing what? - and also can be loaded as floating point values representing microvolts. Since the representation should not make any difference when analyzing the spectrum we use the smaller representation %TODO: check + The signal is loaded as matrix of 41 channels (see Table~\ref{tab:channelNames}). All the values are integers corresponding to the voltage and also can be loaded as floating point values representing microvolts. Since the representation should not make any difference when analyzing the spectrum we use the smaller representation. \begin{table} \centering \begin{tabular}{c|c|l} @@ -377,7 +376,7 @@ Since it takes some time for commands to go from brain to the muscles, we introduced an variable offset between EEG and other data. The offset has to be given in a number of shifts, so in default is a multiple of 200ms.\\ Results are given in Sections~\ref{res:offsetEEG} and~\ref{res:offsetLF}. \subsection{Pause} - \label{mat:pause} + \label{mat:pause}%TODO \subsection{Prediction with interim step} All these analyses only show the accuracy of one step. To get a measure for the over-all performance we predict synergies from EEG and use them to predict EMG or kinematics respectively.\\ The resulting correlation is the mean of the correlations of a 10-fold cross validation where the same unknown synergies are predicted from EEG and used to predict EMG or kinematics. So there is no correction step between the steps and EMG or kinematics are predicted from EEG via the Synergies. Here also different methods to determine Synergies are compared (see Section~\ref{res:differentSynergiesVia}). @@ -387,7 +386,41 @@ \subsection{Evaluation} \subsubsection{Default values} \label{mat:default} + The values of our variables used in \texttt{'Default'} are given in table~\ref{tab:default}. + \begin{table} + \centering + \begin{tabular}{r|c|l} + Variable & default & Meaning\\\hline + allSubjects & \true & is the computation done for all 51 sessions\\ + &&or only for one randomly chosen?\\ + eegOffset & 0 & amount of offset applied for EEG data (cf. \ref{mat:offset})\\ + $k$ & 10 & iterations of cross validation (do not change)\\ + maxEEGFreq & 49 & Frequency for a Butterworth low-pass filter\\ + minEEGFreq & 2 & Frequency for a Butterworth high-pass filter\\ + maxExpC & 0 & SVM tries values $10^{-x}$ to $10^{x}$ + with steps in x: 1\\ + maxFile & 5 & number of files per session\\ + maxPerClass & 250 & maximum number of data points in one svm class\\ + && (only for training)\\ + noLFsamples & 5 & number of samples out of one time window\\ && used for LF predictions\\ + noSynergies & 3 & number of Synergies used\\ + pause & 0 & apply pause or not? (cf. \ref{mat:pause})\\ + pBurgOrder & 250 & order of model for Burg's model (cf. \ref{mat:burg})\\ + ridgeParams & 100 & Array of parameters tried in cross \\&&validation for ridge\\ + shiftEEG & 0.2 & shift of the EEG window in each step\\ + shiftEMG & 0.05 & shift of the EMG window in each step\\ + threshold & 10000 & threshold for classifiaction as movement (cf. \ref{mm:newClass})\\ + windowEEG & 1 & size of the EEG window \\ + windowEMG & 0.2 & size of the EMG window \\ + \end{tabular} + \caption{Values used for default} + \label{tab:default} + \end{table} \subsubsection{Boxplot} + To plot data and show their distribution we use boxplots. + A boxplot contains information about the median (red line), 0.25 and 0.75 quantiles (ends of the box) and about the highest and lowest values that are not classified as outliers.\\ + A data point $y$ is classified as outlier if $y > q_3+1.5\cdot(q_3-q_1)$ or $y < q_1-1.5\cdot(q_3-q_1)$, where $q_1,q_3$ are the first and third quartile (which are also defining the box). \subsubsection{ANOVA} - %ANOVA -%TODO: evaluation + Analysis of Variance (ANOVA) is a way of checking if there is a main effect of a variable.\\ + The Hypotheses tested are that all group means are equal ($H_0$) or they are not ($H_1$). To check on those ANOVA compares the deviation from the over-all mean and compares it to the deviation within the groups. If a lot of variance in the data can be explained by the groups (meaning in-group variance is lower than variance between groups) it is quite likely that the proposed groups have different means.\\ + Whether this is significant is decided based on the $p$-Value representing the probability that the difference between in-group and between-group variance is even higher. $H_0$ is rejected if $p$ is lower than a defined threshold (often $0.05$, $0.01$ or $0.001$). diff --git a/text/thesis/03Results.tex b/text/thesis/03Results.tex index 5672470..d0b70e6 100644 --- a/text/thesis/03Results.tex +++ b/text/thesis/03Results.tex @@ -1,5 +1,8 @@ \chapter{Results} \label{chp:results} +\section{Number of Synergies} +%TODO: plot, decision for 3 +%TODO: compare different number of synergies \section{Classification} %TODO: Confusion Matrices \subsection{Comparison of methods of recording} @@ -149,6 +152,7 @@ \label{tab:corrPos} \end{table} \subsection{Compare Prediction direct and via Synergies} + \label{res:differentSynergiesVia} \subsubsection{Velocities} There is a significant\footnote{$p<0.001$} difference between the predictions. The different synergies however have no significant difference ($p\approx0.87$). Also see figure~\ref{fig:directVia}. \begin{figure} diff --git a/text/thesis/thesis.tex b/text/thesis/thesis.tex index ce66066..54c5656 100644 --- a/text/thesis/thesis.tex +++ b/text/thesis/thesis.tex @@ -52,6 +52,8 @@ \newcommand{\matlab}{\textsc{Matlab}} +\newcommand{\true}{\texttt{true}} +\newcommand{\false}{\texttt{false}} \begin{document} @@ -196,6 +198,7 @@ \textbf{ANN}\> Artificial Neural Network \\ \textbf{PSD}\> Power Spectral Density \\ \textbf{ALS}\> Alternating Least Squares \\ +\textbf{ANOVA} \> Analysis of Variance\\ \end{tabbing} \cleardoublepage