## 4 Experimental Results
### Deep Learning Approach Using Transfer Learning  
Given that the spectral features show discriminative nature in different emotional music data, a deep learning technique was used for classifying different emotional music clusters. More than 3200 spectrogram images were generated from the dataset by Fourier transform. Figure 4 shows the flow chart of the overall deep CNN approach. The arousal and valence values of the samples from the dataset were scaled to the range of [1,100], which are mapped onto a 2D-plane of arousal and valence. Some generated sample images from each class are shown in Figure 5a. The window size for the Fourier transform was 60 s for every spectrogram image. As shown in Figure 5b, we separated the 2D plane into 9 sub-areas where each sub-area has the same size of the area. The points located in the same area were grouped into the same class and 8 classes were separated from the dataset. However, it is shown that in Figure 5b, the dataset is imbalanced where the classes are not represented equally, and most of the data points are clustered in class 5. This problem can be alleviated by adding more weights to the classes with \begin{table}
\begin{tabular}{l c c c c c c} \hline \hline  & \multicolumn{4}{c}{RMSE} \\  & & \multicolumn{2}{c}{Arousal} & \multicolumn{2}{c}{Valence} \\  & PLS & PCR & FF & PLS & PCR & FF \\ \hline base. & 0.146 & 0.147 & 0.172 & 0.156 & 0.156 & 0.169 \\ STC & 0.149 & 0.150 & 0.179 & 0.156 & 0.157 & 0.172 \\ base+STC & 0.144 & 0.144 & 0.165 & 0.151 & 0.150 & 0.158 \\ \hline \hline \end{tabular}
\begin{tabular}{l c c c c c c} \hline \hline  & \multicolumn{4}{c}{Pearson’s coefficient} \\  & & \multicolumn{2}{c}{Arousal} & \multicolumn{2}{c}{Valence} \\  & PLS & PCR & FF & PLS & PCR & FF \\ \hline base. & 0.785 & 0.781 & 0.732 & 0.601 & 0.612 & 0.570 \\ STC & 0.775 & 0.770 & 0.730 & 0.600 & 0.585 & 0.551 \\ base+STC & 0.793 & 0.793 & 0.754 & 0.630 & 0.634 & 0.609 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Regression prediction results using the baseline features, sinusoidal transform coding (STC)-based features, and the combined features. The three regression models used are principal component regression (PCR), partial least square (PLS), and feedforward neural network (FF) models. Figure 4: The flow chart of the overall deep learning approach. fewer samples. A stratified 5-fold cross-validation based on the ID of the songs was run to ensure the test set only contains the unseen data because the spectrogram images from the same song would be similar. Furthermore, the process of the stratification could ensure each fold preserve the percentage of samples for each class to better represent the whole dataset. Several pre-trained deep networks were evaluated for classifying the spectrogram images. The purpose of using different deep networks for this study is developing a guideline for choosing a deep learning model in future research. The present study aims to determine the better performance model for our target task, so all the hyper-parameters, optimizer, and loss function of the deep learning models are set to be the same. We set the training epochs to 60, and introduced the stochastic gradient descent optimizer to train the network, and used the cross-entropy function to evaluate the loss. For the reason that the deep models we used in this study were pre-trained on the ImageNet dataset which is not similar to our target dataset, we freeze all the layers of the networks and only train the last fully connected layer to avoid overfitting. As shown in Figure 4, the pre-trained models act as a feature extractor that generates the embedding feature vectors, and a replaced fully connected layer was used to classify them. Depending on the differences between the architecture of these models, the trainable parameters during training will be different. Table 3 shows the results of different deep network architectures we used in this study, which includes VGG [23], AlexNet [24], Inception [25], ResNet [26], DenseNet [27] and ResNext [28].