## 4 Pattern Recognition
### Restricted Boltzmann Machines
Thus, the algorithm may yield different results depending on how the data was divided into the training and testing datasets. One of the most used methods to overcome this problem is known as K-fold Cross-Validation. This technique is based on splitting the data set into \(k\) smaller sets and repeat the training and testing \(k\) times. Each time the algorithm uses one different testing dataset, the other \(k-1\) datasets are used for training. Then, the validation results are averaged to obtain the overall performance of the algorithm (see Figure 9). This testing procedure allows us to describe how well the classifier performs using different datasets. \begin{table}
\begin{tabular}{l l l} \hline \hline
**Method** & **Advantages** & **Disadvantages** & **Ref** \\ \hline \multirow{3}{*}{**SOM**} & - Good for dimensional reduction & - The maps are not the same (initialize randomly) \\  & - Does not require label & - No direct classification & [57; 58; 59] \\  & - Outliers affect single portions of the map & - The size of the map is not obvious & \\ \hline \multirow{3}{*}{**LDA**} & - Fast Method & - Requires normal Distribution \\  & - Easy to implement & - Decision boundaries are linear & [60; 61] \\  & - Limited to two classes & \\ \hline \multirow{3}{*}{**BP**} & - Can detect complex relationships between variables & - Are prone to overfitting \\  & - Require less formal statistical training to develop & - Computational Expensive & [62; 63] \\ \hline \multirow{3}{*}{**SVM**} & - Convex optimization problem (no local minima). & - Binary Classifier; for multiclass, it requires to use \\  & - Can be used with a kernel so can model non-linear relationships & other methods. & [64; 65; 66] \\  & - Regularization parameter helps to avoid over-fitting. & - Specific kernel is needed to have good separability \\ \hline \multirow{3}{*}{**RBM**} & - Generative Model & - Computational Expensive & [67; 68] \\  & - Able to construct Deep artificial Neural Networks & - Time Consuming & [67; 68] \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Advantages and disadvantages of the methods. ## 5 Method

To test the previously described techniques, we used the dataset from [37] (a link to this dataset can be found in Appendix C), consisting of EEG and EOG recordings from ten naive right-handed subjects (six male and four female) with an average age of \(24.7\pm 3.3\) years. Furthermore, the participants had normal or corrected-to-normal vision during the experiments. The gathered data consisted of three bipolar EEG recordings (C3, Cz and C4) with a sampling frequency of 250 Hz and the electrode Fz as the EEG ground, as shown in Figure 10a. The recorded signals had a dynamic range of \(\pm 100\) uV, which were analog bandpass filtered (0.5-100 Hz) and notch filtered (50 Hz). At the same time, EOG data were recorded using three monopolar electrodes (Figure 10b) with a dynamic voltage range of \(\pm 1\) mV. Each subject participated in five sessions, two without feedback and three with feedback. At the beginning of each session, a 5-minute recording of continuous eye behavior was made to estimate the EOG artifact correction coefficients. These recordings were divided as follows: eyes open during 2 min, eyes closed during 1 min and eyes moving during 1 min (see Appendix A). The sessions without feedback were done using a cue-based paradigm (Figure 11a), in which each subject had to perform motor imagery (MI) depending on the visual cue shown in the monitor. Each trial started with a fixated cross and an additional short warning tone. Then, after some seconds, the visual cue consisting of an arrow pointing either to the right or to the left appeared for 1.25 s. Afterward, the subject had to maintain the corresponding MI for a period of 4 s. In between trials, a short break of a random period between 1.5 and 2.5 s was given to avoid adaptation. The three feedback sessions consisted of four runs with twenty trials for each type of motor imagery.