# Detecting the Speed Change Intention from EEG Signals:
## 2 Materials and Methods
### Offline BMI
#### 2.5.3 Cross-Validation and Feature Selection  
In this section, the proposed features and electrode configurations were tested in order to check its capacity to detect the change of speed intention. This was done considering three conditions: a model with both speed changes as a common class (increase and decrease repetitions all together) vs. common speed walking state; and splitting the model for increase vs. common speed walking state and decrease vs. common speed walking state. The binary linear svm classifier (with a radial basis function kernel) was employed to obtain the accuracy percentages of a k-fold cross validation. Each of the models (Increase, Decrease or Both) was created with the repetitions considered as valid (see Table 1) minus those used for testing, which were always eight. The class walk was labeled as 0 and the class  
Figure 4: The image shows a map of the electrodes for each configuration analyzed. The positions in green show the recorded EEG electrodes. The red ones indicate which of them were selected for each configuration in the processing section.  
change was labeled as 1. Depending on the result of the binary classifier, each repetition was marked as a true or false event detection. Percentages of the total accuracies for walk and change speed classes (Equation (7)) were computed. In addition, the balance index (Equation (8)) related to the accuracy of both classes was assessed.  
\[Acc=\frac{\text{Number of true event detection}}{\text{Number of total event detection}} \tag{7}\]  
\[balance=abs(\frac{AccClassChange-AccTotal}{AccClassChange}) \tag{8}\]  
To evaluate which were the best single features, 540 different configurations were tested for each of the five subjects: three types of classification models (Both, Increase and Decrease), six features, five electrode setups and six frequency bands. Only the results over 10 for both indices, accuracy and balance (Equations (7) and (8)), were considered as acceptable. The minimum value of accuracy to consider the model was acting over randomness was established according to the paper [26]. The threshold (Equation (9)) depends on the number of available samples (80 repetitions minus those neglected, Table 1). Results of each feature in each band that exceed this threshold have been averaged regardless of model classification, electrode combinations or subject (not all the configurations met the criteria). Then, a selection of features were done according to two criteria: number of times the features in the specific band was selected per user greater than the mean; and if the average percentage result was over the median of values. With these conditions, six features in different bands were selected.  
\[RandomnessLevel=0.5+1.96\times\sqrt{\frac{0.5^{2}}{NumberofValidRepetition+4}} \tag{9}\]  
After this selection, to improve the classification performance based on individual features, all possible combinations with 6 individual features were carried out 2 in 2 to evaluate if more information by window could improve the results. This produced 15 combinations that were evaluated for the three types of classification models (Both, Increase and Decrease) and the 5 electrode configurations. In total, 150 combinations were tested for each user.