diff --git a/text/thesis/01Introduction.tex b/text/thesis/01Introduction.tex index d16bc66..e495214 100644 --- a/text/thesis/01Introduction.tex +++ b/text/thesis/01Introduction.tex @@ -16,10 +16,10 @@ Assuming this it should be easier to predict synergies while we can also use them to move a robotic arm or a quadrocopter. This improvements shall be shown in this thesis. To do so, different methods of the acquisition of synergies from EMG are compared with other data and paradigms like direct prediction from EEG, EMG and low frequencies. -\section{Overview}%TODO +\section{Overview} After this Introduction the scientific background and context of this work will be stated (Chapter \ref{chp:background}). This reaches from Principal Component Analysis (PCA) and Autoencoders over Support Vector Machines (SVMs) and regression to boxplots and topographical plots.\\ - Material and Methods (Chapter \ref{chp:mat}) shows the work done for tis thesis, beginning with the experimental design followed by the methods for data preprocessing and analysis.\\ - In chapter \ref{chp:results} Results we show the numerical findings of our work separated into parts on synergies, classification, regression and a topographical analysis of the brain activity.\\ - These results and their meaning will be discussed in chapter \ref{chp:dis} Discussion, which is concluded with a look into the possible future. + Material and Methods (Chapter \ref{chp:mat}) shows the work done for this thesis, beginning with the experimental design followed by the methods for data preprocessing and analysis.\\ + In chapter \ref{chp:results} Results the numerical findings of the work are shown beginning with the different methods of recording and their comparison, followed by the findings on synergies and concluded by topographical findings.\\ + These results and their meaning are discussed in chapter \ref{chp:dis} Discussion, which is concluded with a look into the possible future. - The appendix then contains a list of contents on the CD and in the repository (Appendix \ref{app:cd}) and a small documentation of the code used (Appendix \ref{app:docu}). + The appendix contains a list of contents on the CD and in the repository (Appendix \ref{app:cd}) and a small documentation of the code used (Appendix \ref{app:docu}). diff --git a/text/thesis/02MaterialsAndMethods.tex b/text/thesis/02MaterialsAndMethods.tex index 8e1c1d3..0287523 100644 --- a/text/thesis/02MaterialsAndMethods.tex +++ b/text/thesis/02MaterialsAndMethods.tex @@ -40,7 +40,7 @@ \end{itemize} There are different definitions of the limits of the bands, but for a rough estimation these limits are suitable. For more exact results an analysis of wave patterns would be necessary. - In limits similar to them of the alpha wave also Mu-waves are measured. They are associated with mirror neurons in the motor cortex and their activity is suppressed while the subject is moving. %TODO + In limits similar to them of the alpha wave also mu-waves are measured. They are associated with mirror neurons in the motor cortex whose activity is suppressed while the subject is moving. This suppression can be detected as the arc-shaped mu-rhythm. \subsection{Low Frequencies} In the 2000s there began a movement using new techniques to record ultrafast and infraslow brainwaves (above 50Hz and below 1Hz). These were found to be of some importance for movement prediction (cf. \cite{Vanhatalo04}).\\ Also in predicting movements there was found some significance in low frequency as was done by \cite{Liu11} and \cite{Antelis13} for example. \citeauthor{Antelis13} found correlations between hand movement and the low frequency signal of $(0.29,0.15,0.37)$ in the dimensions respectively.\\ @@ -160,13 +160,15 @@ $$\text{Minimize }\frac{1}{N}\sum\limits_{i=1}^N\max\{0,1-y_i(\vec{w}\cdot\vec{x_i}-b)\}+\lambda ||\vec{w}||^2,$$ where $\lambda$ is the parameter that adjusts the trade-off between large margins and wrong classifications (if $\lambda$ has a higher value, there is more weight on large margins). \subsubsection{Kernel trick} - Data like those in figure~\ref{fig:kernel} are not \emph{linearly} separable. The idea here is to apply the \emph{kernel trick} meaning to separate the data in a higher dimensional space where they are linear separable. In the example this is accomplished by using the distance from origin as feature and separating in that space. %TODO + Data like that in figure~\ref{fig:kernel} are not \emph{linearly} separable. The idea here is to apply the \emph{kernel trick}.\\ + The kernel trick consists of mapping the input data to a higher dimensional space and separate it there. In many applications this mapping would be computationally expensive, for SVMs however we only need to map the inner products, e.g. as $$\varphi(\vec{x_i})^T\varphi(\vec{x_j})=K(\vec{x_i},\vec{x_j}),$$ where $\varphi$ is the mapping , $x_i$ are data points and $K$ is the kernel. + We do not have to compute - or even know - $\varphi$, since $K$ only depends on the original input. This is a lot less costly and can be done quite fast. Solving the SVM in a higher dimensional space also works well. \begin{figure} \input{pictures/kernel.tikz} \caption{Data separable with the kernel trick; left in the original space with features $x$ and $y$, right in the dimension where distance from the origin is shown and the data is linear separable} \label{fig:kernel} \end{figure} - Common kernels are polynomial, Gaussian and hyperbolic kernels. + Common kernels are polynomial, Gaussian and hyperbolic kernels, where an example for a polynomial kernel would be $K(x_i,x_j)=(x_i^Tx_j)^3$. \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. Using 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 - apart from noise $\epsilon$ - be the same as $y$.\\ @@ -244,6 +246,7 @@ 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). \chapter{Materials and Methods} \label{chp:mat} + All the processing was done on Ubuntu \texttt{14.04 / 3.19.0-39} with \matlab{} \texttt{R2016a (9.0.0.341360) 64-bit (glnxa64) February 11, 2016}. \section{Experimental design} \label{mm:design} The data used for this work was mainly recorded by Farid Shiman, Nerea Irastorza-Landa, and Andrea Sarasola-Sanz for their work (\cite{Shiman15},\cite{Sarasola15}). I was allowed to use it for further analysis.\\ @@ -263,7 +266,6 @@ After the auditory cue the participants should \qq{perform the movement and return to the starting position at a comfortable pace but within 4 seconds} (\cite{Shiman15}).\\ For each subject there are 4 to 6 sessions, each recorded on a different day. All in all there are 255 runs in 51 sessions. Each session is analyzed independently as one continuous trial. \section{Data Preprocessing} - All the processing was done on Ubuntu \texttt{14.04 / 3.19.0-39} with \matlab{} \texttt{R2016a (9.0.0.341360) 64-bit (glnxa64) February 11, 2016}. \subsection{Loading of data} The data recorded with BCI2000 (\cite{Schalk04}) can be loaded into \matlab{} with a specific \texttt{.mex} file. The according \texttt{.mex}-Files for some platforms (Windows, MAC, Linux) are available from BCI2000 precompiled.\\ The signal plus the according status data and the parameters is loaded as shown in Algorithm~\ref{alg:load_bcidat}).