# A Two-Step Framework to Recognize Emotion Using the Combinations of Adjacent Frequency Bands of EEG
## 4 Materials and Experiments
### Experimental Setting  
In this paper, we only consider the subject-dependent pattern. Suppose the preprocessed data of each subject are expressed as \(Data=[D_{1},D_{2},\dots,D_{b}]\in R^{N\times(b^{m})}\), where \(N\) is the trial sample number, \(b\) is the frequency band number, \(m\) is the channel number, and \(D_{i}\in R^{N\times m}\) is the corresponding dataset of the \(i\)-th frequency band. In the DEAP database, the labels of arousal and valence are concerned in our research. Considering that these labels have scores between one and nine, the median of five is set as the threshold to distinguish the scores of low and high labels. Thus, in the binary-classification problem of the DEAP database with \(b=4\), the EEG data of each subject can be expressed as \(Data=[D_{1},D_{2},D_{3},D_{4}]\), and can be divided into 10 sub-datasets. For example, the sub-dataset corresponding to the combination of alpha and beta is \(D_{23}=[D_{2},D_{3}]\), and that of beta and gamma is \(D_{34}=[D_{3},D_{4}]\). In the SEED IV database, there are four emotional labels. Thus, in the four-classification problem of the SEED IV database with \(b=5\), the EEG data of each subject are expressed as \(Data=[D_{1},D_{2},D_{3},D_{4},D_{5}]\), which can be divided into 15 sub-datasets. For example, the sub-dataset corresponding to the combination of theta, alpha, and beta is \(D_{234}=[D_{2},D_{3},D_{4}]\). Each sub-dataset is used to train the HCRC method in the same way. Our framework aims to generate combinations of adjacent frequency bands to acquire prediction results for all the combinations through HCRC and fuse the decisions according to these prediction results by CGEL. For example, for one subject in the SEED IV database, the processed EEG dataset is divided into a training set and a testing set, and the training set and testing set are divided into 15 subsets each, which correspond to the 15 combinations. All of the training subsets and testing subsets are then consistently and separately fed into the HCRC method to obtain prediction results, which are noted as column vectors. The training and testing decision sets are then constructed by concatenating all the training and testing subsets by column. The final results of the testing decision set, which are also the results of the testing set, are computed by putting the decision sets into the CGEL method. In the HCRC method, there is only one regularization parameter \(\lambda\). In terms of statistics, HCRC does not change the principles of CRC_RLS. The regulation parameter \(\lambda\) produced the best classification outcomes in the range [0.1-1 \(\times\) 10\({}^{-6}\)] when [PERSON] et al. [27] assessed the effectiveness of the CRC RLS method. Therefore, \(\lambda\) is set to 0.015 in both datasets. In the CGEL method, we set 100 as the threshold, and, respectively, set (9,2), (8,2), (7,2) and (14,2), (13,2), (12,2) as the window size and stride on DEAP and SEED IV databases. In addition, after the first step in our framework, there are 10 or 15 prediction results; we directly calculate the simple majority voting by row and record it as HCRC-SMV. In this article, we compare the prediction results of HCRC-CGEL with HCRC-SMV, KNN, SVM, and RF in the same training sets and testing sets in our experiments. In the KNN method, the classification results of the DEAP and SEED IV databases are conducted by the function neighbors.kNeighborsClassifier in the Python package sklearn, with the parameter n_neighbors set to 10. In the SVM method, the penalty parameter C in the DEAP and SEED IV databases is, respectively, selected from [0.05, 0.1, 0.5, 1,5] and [0.001, 0.005, 0.01, 0.05, 0.1] by the python sklearn package's model_select.GridSearchCV function to choose the best. In the RF method, the classification results of the DEAP and SEED IV databases are conducted by the function ensemble.RandomForestClassifier in the Python package sklearn, with the parameter n_estimators set to 100 and random_state set to 1234.