## 4 Pattern Recognition
### Restricted Boltzmann Machines
To allow students to achieve a better comprehension of the presented methods, it is important to make an improved test bench with different band sizes as in [37] or use some other type of filter or dimensionality reduction method such as Common Spatial Patterns [69] (this can be seen in Appendix B), which is also part of the current state-of-the-art BCI. Additionally, more advanced artificial intelligence techniques for BCI classification can be explored to provide students with additional information about algorithms that are not only applied on BCI but also on other areas of Industry 4.0. Conceptualization, D.B., P.P. and A.M.; Data curation, D.B. ; Formal analysis, D.B. and P.P. ; Funding acquisition, A.M.; Investigation, D.B. ; Methodology, D.B. ; Project administration, P.P. ; Software, D.B. ; Supervision, P.P. and A.M.; Validation, D.B., P.P. and D.L.-B. ; Visualization, D.B. ; Writing--original draft, D.B., D.L.-B. and A.M.; Writing--review & editing, D.B., P.P. and D.L.-B. All authors have read and agreed to the published version of the manuscript. This research received no external funding. Not Applicable, the study does not report any data. The authors declare no conflict of interest. ## Appendix A Reduction of EOG Artifacts over EEG

One of the main sources of noise for EEG is EOG noise. EOG noise comes from retinal dipole and eyelid movements. Both of them create a potential shift in the surface of the scalp [70]. A normal procedure to remove these artifacts is the regression procedure explained in [71], which consists of using three EOG spatial components recordings (horizontal, vertical and radial) multiplied by a specifically weighted coefficient and subtracting them from the noisy signal. For this, it is supposed that the signal without artifacts is described by:

\[S=Y-N\cdot b \tag{1}\]

with \(S\) as the non-contaminated EEG signal, \(Y\) is the recorded EEG channel at time \(t\), \(N\) are the noise sources (\(n_{ver,hor,rad}\) vertical, horizontal and radial recorded EOG channels), and \(b\) are the weighted coefficients (\(b_{ver,hor,rad}\)) of the EOG artifacts at the EEG channel. To obtain the real signal \(S\), the noise source has to be recorded, and the weighting coefficients must be obtainable. To calculate \(b\), it is presumed that the noise source \(N\) (i.e., EOG) and the signal \(S\) (i.e., EEG) are independent, then:

\[<N^{T}S>=<N^{T}Y>-<N^{T}N>b \tag{2}\]

with \(<N^{T}S>=0\) we can calculate \(b\) as:

\[b=<N^{T}N>^{-1}<N^{T}Y>=C_{NN}^{-1}C_{NY} \tag{3}\]

with \(C_{NN}\) as the auto-covariance matrix of the EOG channels and \(C_{NY}\) as the cross-covariance matrix between the EEG and EOG channels. In particular, the three monopolar electrodes for EOG are mounted over the face, as shown in Figure 10, where two bipolar EOG can be derived (i.e., horizontal and vertical EOG activity). To obtain a better approximation of weighted coefficients \(b\), as a normal procedure, at the start of each BCI session, a specific type of EOG recordings are made, where the subjects are asked to perform eye blinks, roll the eyes clockwise and counterclockwise and move the eyes upwards and downwards (Table 1). These movements are done to cover the whole field of view without moving the head. ## Appendix B Common Spatial Patterns

Common Spatial Patterns (CSP) is used to learn spatial filters for brain signal analysis and introduced by [PERSON] [72] for movement-related EEG and later proved to be useful for imaginary hand movement by [PERSON] [69]. CSP's goal is to design a spatial filter that finds the optimal variance for discrimination, put differently, is to apply a linear transformation that maps the input to have maximum variance between two classes. Although CSP can only be applied to a binary problem, it has already been extended [73; 74] by combining various binary spatial filters, which reduce the multi-class problem into various binary decisions. The algorithm of CSP can be seen in Algorithm 1.