# Long-Term EEG Component Analysis Method Based on Lasso Regression
## 2 Methods
### Acoustic Feature Extraction  
In the current auditory recognition methods, acoustic features are extracted in the form of frames. The extraction process is as follows: (1) divide the audio signal into frames; (2) extract features for each frame; (3) calculate the first-order difference of the frame features; and (4) finally use the frame feature and the mean-variance of the first-order difference as the feature of the entire audio. There are 48 dimensions in the feature set, including low-level descriptors: the loudness, root-mean-square signal frame energy, intensity, loudness, 12 MFCC, pitch (F0), its envelope, F0 envelope, 8 line spectral frequencies, and zero-crossing rate; and the statistical values of these features are: the maximum, minimum, range, arithmetic mean, two linear regression coefficients, linear and quadratic error, standard deviation, skewness, kurtosis,  
Figure 2: The process of the long-term EEG component analysis method proposed in this article. quartile 1-3 and 3 inter-quartile ranges, and delta regression coefficients. These are taken from the OpenSMILE configuration file for the IS09 emotion challenge, which were also used in [24] and [25]. In the process of the feature extraction of the sound signal, the frame length is set to 50 ms, and the frame shift is 10 ms, which is easy to align with the envelope of the EEG. The correlation analysis based on the similarity matrix is used for feature dimension reduction. The construction method is as follows:  
First of all, set the music signal as \(A_{i},\ 1\leq i\leq N\) (\(N\) is the number of samples) and acoustic features as \(F_{i},\ 1\leq i\leq M\) (\(M\) is the feature dimension). The feature set (\(F\)) includes low-level features such as pitch, zero-crossing rate, and loudness, as well as high-level semantic features, such as brightness, and roughness. The behavior ratings of emotion labels (valence and arousal) are \(L\). As discussed above, the human brain's response to music is based not only on the audio information at the current moment, but also on the time before the current moment. To preserve the time information, the audio feature \(F_{i}\) is windowed and divided into frames. Secondly, construct a feature similarity matrix (_FDM_) for each feature and a label similarity matrix (_LDM_) for the valence and arousal ratings. The feature similarity matrix (_FDM_) is built as follows:  
\[FDM_{pg}\ =\ dist(F^{p},F^{q}),\ 1\leq p,q\leq N \tag{1}\]  
where \(F^{p}\) and \(F^{q}\) represent the feature vector of the \(p\)-th sample and the \(q\)-th sample, and _dist(X,Y)_ represents the cosine similarity between \(X\) and \(Y\). \[dist(X,Y)\ =\ \frac{\overset{\rightarrow}{x}\overset{\rightarrow}{y}}{\|x \|\cdot\|y\|} \tag{2}\]  
The distance function could be Euclidean distance, Mahalanobis distance, and Cosine similarity. To test the performance of distance function, 259 initial samples were divided into two categories: living sound and nonliving sound, which have been proved to be quite different [26]. The similarity matrices of the same feature were calculated, respectively, by using Euclidean distance, Mahalanobis distance, and cosine similarity, shown in Figure 3. There were two groups: the first 125 samples were living sounds and the last 134 samples were nonliving sounds. The difference between the two groups was used as the selection criteria. The distances with a large difference between groups, and a small difference within groups were used. Here, cosine similarity was selected, which could better describe the difference of specific feature vectors. Figure 3: The similarity matrices of the same feature (zero crossing) were calculated respectively by using (**a**) Euclidean distance, (**b**) Mahalanobis distance, and (**c**) Cosine similarity. A dark color means similar and a bright color means dissimilar. The sum value of dissimilarity by cosine was higher than the euclidean and mahalanobis distances.