# A Fusion Framework for Confusion Analysis in Learning Based on EEG Signals
## 4 Experiments and Discussions
### Experiment Settings  
We follow the settings outlined in [1] and conduct experiments involving binary classification (confused and non-confused) and four classification (confused, non-confused, guess, and think-right). In addition, we consider the following two scenarios to validate the proposed methods.  
1. subject-dependent: the data are trained across multiple subjects in the subject-dependent experiments. Specifically, 70% of the EEG data from all experiments for each participant are allocated as the training set, while the remaining 30% serve as the testing set.
2. subject-independent: In the subject-independent model, the experiment emphasizes the differences between different subjects to test the method's generalization ability. Specifically, EEG data are divided into a cross-subject validation set with a split of 70%/30%, where the data from 16 subjects is used for training, and the data from the remaining seven subjects is used for testing.  
To evaluate the classification performance of various methods, we consider the outcomes of conventional machine learning classifiers (Naive Bayes, SVM, and Random Forest) based on PSD features as presented in [1], as well as end-to-end methods (LSTM [30], ResNet [37], and EEGNet [26]). Furthermore, we conduct experiments using our approach without extracting PSD features to explore the benefits of feature extraction.  
When extracting the samples of each category, we set a sliding window of 4 s to segment the data according to the setting in [1; 38; 39] to increase the sample size, i.e., the experimental samples of 4 s of EEG data. At the same time, to solve the data imbalance problem, we set overlapping parts of different lengths: 0.25 s for confused, 0.75 s for non-confused, 0.5 s for think-right, and 0.75 s for guess.  
In this paper, the MNE [40] library in Python is adopted for data preprocessing operations. Our method is implemented with the PyTorch framework in Python 3.8 with an NVIDIA Geforce 3090 GPU. Using the same hyperparameter settings, we fix random seeds to repeat the experiment for different methods. We train the model using Adam optimizer with a learning rate of \(1\times e^{-4}\). The Adam optimizer combines the benefits of Momentum and RMSprop and adaptively adjusts the learning rate. \(1\times e^{-4}\) is a common starting learning rate. During training, batch size and dropout rates are set to 32 and 0.5.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Emotion Categories** & **Emotion Stimuli** & **\#Subjects** & **\#Channels** & **Sampling Rate** \\ \hline confused, & & 23 & & \\ non-confused, & & male/female: 12/11 & 8 & 250 Hz \\ think-right, guess & & & & \\ \hline \hline \end{tabular}
\end{table}
Table 2: Summary of information on the CAL dataset.  
Figure 2: The eight channel locations (colored orange) of the CAL dataset, using the international 10–20 system.  
The batch size is 32, which is a relatively small value to improve the model's generalization performance. A dropout rate of 0.5 is chosen, a common regularization technique that can reduce overfitting.  
We set the number of multi-head self-attention layers N to 6, the number of heads H to the number of channels with a value of 14, and the dimension of the feed Forward layer to 2048. The number of parameters of the model in this configuration is 1M.