# Emotion Classification Algorithm for Audiovisual Scenes Based on Low-Frequency Signals
## 2 Materials and Methods
### LFS-Based Sentiment Classification Algorithm for Audovisual Scenes
#### 2.2.2 Classification Algorithm Flow  
Based on subjective evaluation experiments and EEG measurement experiments, it was demonstrated that LFS had a significant influence and modulation of known happiness, sadness, and shock, a suppressive effect on happiness in audiovisual scenarios, and that it could enhance sadness and, to varying degrees, shock. The simulation experiments indicated that bass has a consistent effect on enhancing shock. The bass component is the main source of shock in the viewing environment, with a richer database of shock scenes in actual 5.1 sound format films. Therefore, in this section, a classification algorithm for emotion scene classification based on mono-channel SW signals is proposed by processing and analyzing movie clips in 5.1 audio format. The feasibility of using eigenvalues extracted from the SW signal (i.e., the 0.1 channel in the 5.1 audio) for binary classification of shock and other emotion types is verified through training of the classification model, and the most suitable classification model is determined, along with the specific algorithm process and selected eigenvalues. The experimental flowchart is shown in Figure 4, with specific experimental steps as follows. \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Shock Clips** & **Other Emotion Clips** \\ \hline Number of Scene Clips & 10 & 11 \\ Minimum Duration (s) & 79 & 39 \\ Maximum Duration (s) & 239 & 195 \\ Average Duration (s) & 158 & 139 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Information of movie scene clip database, including 10 clips for impressive scenes and 11 clips for other emotion scenes. Figure 4: Complete process of emotion detection for impressive scenes in 5.1 sound format movies. (1) Segmentation of movie clips. Eleven time lengths of 0.5 s and 1 s-10 s are used as window lengths to clip seven shock scenes and eight other emotion scenes extracted from the 5.1 audio format movie emotion scene database. (2) Feature extraction. Based on the time domain, frequency domain, and cepstral domain audio features, six channels and SW channel eigenvalues are calculated for each segmented movie scene in the 5.1 audio format. (3) Feature engineering. The preprocessed dataset is normalized using the min-max method, and the training set and validation set are divided in a 7:3 ratio for training eight classification models. Models with better accuracy performance on the validation set are selected, as well as the optimal time lengths for movie scene segmentation. (4) Feature Selection. After obtaining the optimal time lengths for movie scene segmentation and the classification models, feature selection is performed to achieve dimensionality reduction. Variance of the original eigenvalues is calculated, and features that do not meet the threshold are removed and then normalized using min-max normalization. Kernel density estimation (KDE) plots are used to evaluate the distribution of eigenvalues in the training set and test set, and features with significant differences in data distribution are removed. Correlation heat maps between eigenvalues and labels are plotted, and features with high correlation coefficients with the target variable are selected. After feature selection, data balancing is performed by removing a portion of positive class samples, i.e., shock scenes. (5) Model Training. Finally, classification models are trained using different segmentation window lengths and the selected eigenvalues. GridSearchCV is used to iterate through predefined hyperparameters to select the optimal hyperparameters and further improve the performance of the classification models. (6) Model Testing. Six randomly selected movie scene test clips (three shock scenes and three other emotion scenes) are segmented according to the window lengths and eigenvalues are calculated based on the final selected features. The resulting dataset is normalized using min-max normalization and imported into the selected best classification model for testing to evaluate the generalization ability of the final model.