## 3 Materials and Methods
### The Construction of EEG MFI Sequences  
The International 10-20 System is an internationally recognized method of describing and applying the location of scalp electrodes in the context of an EEG test. The system is based on the relationship between the location of an electrode and the underlying area of the cerebral cortex. The \"10\" and \"20\" refer to the fact that the actual distances between the adjacent electrodes are either 10% or 20% of the total front-back or right-left distance of the skull [46]. Figure 1 shows a plan view of the International 10-20 System and a generalized square matrix from it. We can see that the left of Figure 1 is the International 10-20 System, where the EEG electrodes circled in red are the test points used in the DEAP dataset. In this study, we generalized the International 10-20 System with test electrodes used in the DEAP dataset to form a square matrix (N \(\times\) N), where N is the maximum point number between the horizontal or vertical test points. With the DEAP dataset, N equals 9. The square matrix without filling the EEG frequency features is represented at the right of Figure 1. The gray triangle above the center of the square matrix represents the nasion, while the red points are the electrodes corresponding to the red circles in the International 10-20 System. The gray points are added to form a fully matrix. The value of the red point corresponded to the frequency feature (PSD) of the EEG electrode. The value of the gray point is the interpolation of the red points surrounding it. Figure 1: The International 10-20 System and the corresponding square EEG feature matrix (9 \(\times\) 9) with tested EEG electrodes (the red points are tested in the trial and the gray points are not tested. Figure 1 presents the method of mapping the International 10-20 System to a generalized EEG feature matrix. With this method, a single frame EEG MFI can be built from the EEG signal within a time window. With the time window moving forward, an EEG MFI sequence is constructed from the EEG signal. The process is presented in Figure 2. The definition of the red points and gray points is as same as it is defined in Figure 1. The different colors in EEG images represent the value of the EEG feature. The higher the feature is, the closer it is to the dark red. The lower the feature is, the closer it is to the dark blue. And the range of the EEG feature value is from 0 to 1. The EEG MFI sequence construction process consists of three steps. First, the raw EEG signals are extracted from DEAP, which included the multi-channel EEG signal of 32 subjects. Each subject has 40 trials where each trial includes the EEG signals of 32 channels, each signal lasting for 60 s. In the leftmost image of Figure 2, we schematically show the raw EEG signal of the first 10 channels. After that, the power spectrum density (PSD, [14; 33; 39; 40]) is extracted as a EEG frequency domain feature from the raw signals. The PSD is estimated with [PERSON]'s method in MATLAB (R2016a) using a Hamming window and different time window sizes (1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 30 and 60 s) with no overlap as parameters. A number of (32 channels \(\times\) 60 s/Tl) features are obtained per trial, where Tl is the size of the time window. Using a one-second time window as an example, 1920 (32 \(\times\) 60) features are obtained from a raw EEG signal. After that, the features of each subject are normalized to reduce inter-participant variability by scaling between 0 and 1, as is shown in Equation (1):  
\[F_{i}^{\prime}=\frac{F_{\text{max}_{i}}-F_{i}}{F_{\text{max}_{i}}-F_{\text{ min}_{i}}}, \tag{1}\]  
where \(F_{i}^{\prime}\) is the normalized value of the feature; \(F_{\text{max}_{i}}\), \(F_{\text{min}_{i}}\) are the maximum and minimum value of the internal subject features; and \(F_{i}\) is the \(i\)th value in the feature sequence. The red points in the feature matrix are directly filled with the normalized feature values.