# A Two-Step Framework to Recognize Emotion Using the Combinations of Adjacent Frequency Bands of EEG
## 3 Methods
### The CGEL Method  
The decision fusion model CGEL is inspired by gcForest [31]. gcForest is designed to re-extract features and then achieve classification through ensemble learning of random forests. As the weight of the input data under the scanning rule of gcForest is uneven, CGEL uses a circular multi-grained scanning method to generate majority voting of the input samples. This gives equal weight to each element of the input sample and is more suitable for decision fusion. In order to learn the structure of the scanned samples, CGEL uses the ensemble learning of random forest (RF) [36], complete random forest (CRF) [37], decision tree (DT) [38], and simple majority voting (SMV) layer by layer to learn the most appropriate method for each cascade layer and the best number of the cascade layers. The CGEL method can be divided into two steps: circular multi-grained scanning and ensemble learning. Circular multi-grained scanning is designed to generate majority voting features. In this section, the training decision set and testing decision set are noted as \(D_{train}\in R^{(\sum n_{i})\times 15}\) and \(D_{test}\in R^{(N-\sum n_{i})\times 15}\), respectively. The inputs of the circular multi-grained scanning are the samples of the decision sets. As shown in Figure 3, for a sample \(t\) from the decision sets, considering that each element of \(t\) should have the same weight in the scanning process, \(t\) is spliced back and forth to form a closed loop \(t^{*}\). The closed loop \(t^{*}\) is scanned by the sliding window of size \(w_{i}\in R\) (\(w_{i}\) is smaller than the number of combinations) and stride \(s_{i}\in R(s_{i}=1,2,3)\). In one scanning process, a \(w_{i}\)-dimensional scanned vector is produced by sliding the window for one stride, and the scanning process stops when the head of the sliding window slides a full circle in \(t^{*}\). One scanning process produces one scanned set \(W_{i}\) with several scanned vectors. To each scanned vector, there is a simple majority vote of its element; all the voted elements are spliced together to generate the scanned features \(l_{w_{i},s_{i}}\). By setting up three different sizes of sliding windows \(w_{i}\) and strides \(s_{i}\), all the generated scanned features in the three scanning process can be stitched together to compose the final concatenated vector \(l^{*}_{w,s}=(l_{w_{1},s_{1}},l_{w_{2},s_{2}},l_{w_{3},s_{3}})\in R^{1\times h}\), where \(h\) is the dimension of the concatenated vector. For example, to a decision vector \(V_{i}=[0,0,1,1,3,1,0,1,2,1,1,0,0,0,0]\) with fifteen elements, each element is a classified result of a combination. If we use a window (\(w_{i}=12\)) to scan \(V_{i}\) with a stride (\(s_{i}=2\)), the scanned set is  
\[ \begin{array}{l}W_{i}=\{[0,0,1,1,3,1,0,1,2,1,1,0],\ [1,1,3,1,0,1,2,1,1,0,0,0],\ [3,1,0,1,2,1,1,0,0,0,0,0],\\ \ [0,1,2,1,1,0,0,0,0,0,0,1],\ [2,1,1,0,0,0,0,0,1,1,3],\ [1,0,0,0,0,0,1,1,3,1,0],\\ \ [0,0,0,0,0,1,1,3,1,0,1,2],\ [0,0,0,1,1,3,1,0,1,2,1]\}\end{array} \]  
where the elements of \(W_{i}\) are scanned vectors, and all the simple majority vote results of the elements of scanned vectors are \(\{1,1,0,0,0,0,0,1\}\). Then, the scanned feature of one scanning process is \(l_{w_{i},s_{i}}=[1,1,0,0,0,0,0,1]\). Inspired by the strategy of the level-by-level step of gcForest, ensemble learning adopts a cascade structure to acquire and transmit feature information through the procedure of cascade layers. Each layer is an ensemble of RF, CRF, DT, and SMV. The training process of ensemble learning is shown in Figure 4. All the samples of the \(D_{train}\) and \(D_{test}\) are, respectively, scanned to generate the corresponding concatenated vectors to compose the training feature set \(L_{train}\in R^{(\sum n_{i})\times h}\) and testing feature set \(L_{test}\in R^{(N-\sum n_{i})\times h}\) before training.