\chapter{Results}
\label{chp:results}
\section{Classification}
    \subsection{Comparison of methods of recording}
        The different methods of recording (EEG, EMG and Low frequencies) also differ in the results. An ANOVA gives a $p$-Value of $2.09\cdot 10^{-8}$ ($F=108.29$) for all classifications done on 4 different movements and rest.
        \begin{figure}
            \centering
            \includegraphics[width=0.9\textwidth]{pictures/results/classEEGemgLF.png}
            \caption{EEG, EMG and LF compared based on classification accuracy with 5 classes}
            \label{fig:classEEGemgLF}
        \end{figure}
        The mean classification accuracys for the default run are are given in Table~\ref{tab:accs}.
        \begin{table}
            \centering
            \begin{math}
                \begin{array}
                    {r||c|c|c|c}
                    &\text{EMG}&\text{EEG}&\text{LF}&\text{chance}\\\hline
                    mean&60.4&40.4&32.7&25\\
                    std&7.97&2.27&3.35\\
                    max&71.9&46.7&43.4\\
                    min&35.7&37.2&26.2
                \end{array}
            \end{math}
            \caption{Accuracys for the different methods of recording in default configuration}
            \label{tab:accs}
        \end{table}
        % \begin{itemize}
        %     \item[EMG:] $60.4\%$
        %     \item[EEG:] $40.4\%$
        %     \item[LF:] $32.7\%$
        %     \item[chance:] $25\%$
        % \end{itemize}
    \subsection{EMG}
        In figure~\ref{fig:overviewEMG} the different settings for classification based on EMG-data are shown. Default has values as in \ref{mat:default}. The runs with pause leave out the data 1 second before the movement begins (cf. \ref{mat:pause}).
        \begin{figure}
            \centering
            \includegraphics[width=\textwidth]{pictures/results/overviewEMG.png}
            \caption{Classification with EMG-data}
            \label{fig:overviewEMG}
        \end{figure}
        % \begin{figure}
        %     \centering
        %     \includegraphics[width=\textwidth]{pictures/results/pauseEMG.png}
        %     \caption{EMG-data without and with pause}
        %     \label{fig:pauseEMG}
        % \end{figure}
        When calculating an ANOVA on the data with and without pause we get a $p$-Value of $3.9\cdot 10^{-9}$ ($F=41.68$).
    \subsection{EEG}
        In figure~\ref{fig:overviewEEG} the different settings for classification based on EEG-data are shown. Default has values as in \ref{mat:default}. The runs with pause leave out the data 1 second before the movement begins (cf. \ref{mat:pause}). Runs with offset have an offset of 1 or 2 (cf. \ref{mat:offset}).
        \begin{figure}
            \centering
            \includegraphics[width=\textwidth]{pictures/results/overviewEEG.png}
            \caption{Classification with EEG-data}
            \label{fig:overviewEEG}
        \end{figure}
    \subsection{Low Frequencies}
        In figure~\ref{fig:overviewLF} the different settings for classification based on LowFrequency(LF)-data are shown. Default has values as in \ref{mat:default}. The runs with pause leave out the data 1 second before the movement begins (cf. \ref{mat:pause}). Runs with offset have an offset of 1 or 2 (cf. \ref{mat:offset}).
        \begin{figure}
            \centering
            \includegraphics[width=\textwidth]{pictures/results/overviewLF.png}
            \caption{Classification with LF-data}
            \label{fig:overviewLF}
        \end{figure}
    \subsection{Trade-off parameter}
        With a cross validation we compare the results for the soft-margin parameter for $\lambda=0.1,1,10$. The results are shown in figure~\ref{fig:svmCV}.
\section{Regression}
    \subsection{Comparison of methods of recording}
        \subsubsection{Velocities}
            Predicting velocities from EEG, EMG and Low Frequencies is significantly\footnote{$p\approx1.4\exp{-65}$} pairwise different (cf. figure~\ref{fig:corrEEGemgLF}). The corresponding $p$-Values of the ANOVA are given in table~\ref{tab:pCorr}.
            \begin{figure}
                \centering
                \includegraphics[width=0.9\textwidth]{pictures/results/corrEEGemgLF.png}
                \caption{EEG, EMG and LF compared based on prediction of velocities}
                \label{fig:corrEEGemgLF}
            \end{figure}
            \begin{table}
                \centering
                \begin{math}
                    \begin{array}
                        {r||c|c|c}
                        &EEG&EMG&LF\\\hline
                        EEG&-&4.7\exp{-17}&3.7\exp{-55}\\
                        EMG&4.7\exp{-17}&-&1.2\exp{-7}\\
                        LF&3.7\exp{-55}&1.2\exp{-7}&-
                    \end{array}
                \end{math}
                \caption{$p$-Values for prediction of velocities from EEG, EMG or LF respectively}
                \label{tab:pCorr}
            \end{table}
        \subsubsection{Positions}
            Predicting positions from EEG, EMG and Low Frequencies is significantly\footnote{$p\approx2.1\exp{-223}$} different, however not pairwise (cf. figure~\ref{fig:corrEEGemgLFpos}). Positions predicted from EMG and LF are not significantly different. The corresponding $p$-Values of the ANOVA are given in table~\ref{tab:pCorrPos}.
            \begin{figure}
                \centering
                \includegraphics[width=0.9\textwidth]{pictures/results/corrEEGemgLFpos.png}
                \caption{EEG, EMG and LF compared based on prediction of positions}
                \label{fig:corrEEGemgLFpos}
            \end{figure}
            \begin{table}
                \centering
                \begin{math}
                    \begin{array}
                        {r||c|c|c}
                        &EEG&EMG&LF\\\hline
                        EEG&-&3.2\exp{-91}&2.3\exp{-204}\\
                        EMG&3.2\exp{-91}&-&0.34\\
                        LF&2.3\exp{-204}&0.34&-
                    \end{array}
                \end{math}
                \caption{$p$-Values for prediction of positions from EEG, EMG or LF respectively}
                \label{tab:pCorrPos}
            \end{table}
    \subsection{Compare Prediction direct and via Synergies}
        \subsubsection{Velocities}
            There is a significant\footnote{$p\approx1.7\exp{-24}$} difference between the predictions. The different synergies however have no significant difference ($p\approx0.87$). Also see figure~\ref{fig:directVia}.
            \begin{figure}
                \centering
                \includegraphics[width=\textwidth]{pictures/results/predictKinfromEEG.png}
                \caption{Velocities predicted from EEG direct or via Synergies}
                \label{fig:directVia}
            \end{figure}
        \subsubsection{Positions}
            There is a significant\footnote{$p\approx2.7\exp{-146}$} difference between the predictions. The different synergies however have no significant difference ($p\approx0.85$). Also see figure~\ref{fig:directViaPos}.
            \begin{figure}
                \centering
                \includegraphics[width=\textwidth]{pictures/results/predictPosfromEEG.png}
                \caption{Positions predicted from EEG direct or via Synergies}
                \label{fig:directViaPos}
            \end{figure}
    \subsection{EEG}
        \subsubsection{Offset}
            Offset makes no significant difference when predicting Synergies\footnote{Autoencoder: $p\approx0.81$, PCA: $p\approx0.77$, NMF: $p\approx0.60$} or velocities ($p\approx0.99$) or positions ($p\approx0.98$).
        \subsubsection{Pause}
            Whether there is a pause of 1s or only 0.5s doesn't make a significant difference for Autoencoder ($p\approx0.13$), PCA ($p\approx0.29$), NMF ($p\approx0.054$) or Velocities ($p\approx0.95$).
    \subsection{EMG}
        Using a offset or not does not make any difference since the offset is only applied on EEG-data (cf. \ref{mat:offset}).\\
        Predicting synergies from EMG does not make sense since they are computed from EMG (cf. \ref{mat:synergies}).\\
        \subsubsection{Pause}
            There is no significant effect of the use of a pause when predicting velocities from EMG ($p\approx0.90$).
    \subsection{Low Frequencies}
        \subsubsection{Offset}
            Offset makes no significant difference for predicting Autoencoder ($p\approx0.50$), PCA ($p\approx0.59$), NMF ($p\approx0.38$), velocities ($p\approx0.97$) or position ($p\approx1.0$).
        \subsubsection{Pause}
            There is no effect of pause for velocities from low frequencies ($p\approx0.73$).\\
            However there is an effect for Autoencoder ($p\approx3.2\exp{-6}$), PCA ($p\approx0.0001$) and NMF ($p\approx3.7\exp{-9}$).

            The plot shows a better performance with a shorter pause and more data taken in (see figure~\ref{fig:lfToAutoencPause})
            \begin{figure}
                \centering
                \includegraphics[width=\textwidth]{pictures/results/lfToAutoencPause.png}
                \caption{Autoencoder data predicted from Low Frequencies}
                \label{fig:lfToAutoencPause}
            \end{figure}
