# Analysis of Deep Learning-Based Decision-Making in an Emotional Spontaneous Speech Task
## 4 Interpreting the Model Behaviour
### Class Model Visualisation
Finally, the obtained images for the Dominance dimension are much noisier. However, the \"Dominant\" category seems to be activated at higher frequencies (2000-4000 Hz), while \"Neutral\" is activated at lower ones (below 1000 Hz). In order to evaluate the effectiveness of these images to represent the categories, we tried to artificially transform all the samples in our test set into a specific category (using Deep Dream). To this end, the transformation consists of removing the profile of the deep dream image associated with the category it belongs to from each spectrogram, according to the system, and then adding the profile (deep dream) of the target category. We define the deep dream profile as a function that provides the average and standard deviation, over time, for each frequency, as Equation (3) shows. Assuming that \(x\) is the intensity associated with a time \(t\) and a given frequency \(f\), the average and standard deviation for each frequency are computed as follows:  
\[DD_{avg}(f)=\sum_{t\in\Delta t}\frac{x(f,t)}{\Delta t} \tag{3}\]  
Figure 5: Extraction of the suitable spectrogram that maximises the classification output for each class using the DeepDream technique. \[DD_{std}(f)=\sqrt{\left(\frac{\sum\limits_{t\in\Delta t}(x(f,t)-DD_{avg}(f))^{2}}{ \Delta t}\right)} \tag{4}\]  
The transformation made to remove the profile of a specific category is described in Equation (5). \[x^{\prime}(f,t)_{\forall t\in\Delta t}=\frac{x(f,t)-DD_{avg}(f)}{DD_{std}(f)} \tag{5}\]  
and the transformation made to add the profile of a new category is described in Equation (6):  
\[x^{\prime}(f,t)_{\forall t\in\Delta t}=(x(f,t)\cdot DD_{std}(f))+DD_{avg}(f) \tag{6}\]  
First, the samples that were correctly classified by the Neural Network were considered. These samples were transformed to a new category by applying the transformation in Equation (5) to each spectrogram, thus removing the profile of the category the sample belongs to. Then, the transformation on Equation (6) is applied to add the profile of the new category. These samples were firstly transformed to \"Angry\", then to \"Calm\" and finally to \"Happy\". Finally, the neural network classifies the transformed samples. The resulting confusion matrix is shown in Table 4.  
Table 4 shows that, when the transformations are applied, the system classifies the samples correctly in almost all the cases, i.e., only 7.33% of the samples transformed to \"Happy\" were wrongly classified as \"Angry\". Let us note that the transformation may introduce some noise that might lead to peak values that could be misinterpreted by the system, leading to errors. However, the good results suggest that the deep dream images are good representations of what the neural network learns for each category. Then, all the samples of the test set, i.e., the ones not correctly classified, were considered and the process was replicated again. In this case, the predicted category was considered to remove the profile in the first step. The new results are shown in \[I^{\prime}=\arg\max_{I}S_{c}(I)-\lambda\|I\|_{2}^{2} \tag{2}\]0  
Table 5 shows some more misclassified samples for this experiment (8% of \"Happy\" that were classified as \"Angry\", 10% of \"Calm\" that were classified as \"Happy\" and 2% of \"Angry\" that were classified as \"Calm\"). In this case, there are more noisy samples because, when converting them to a new category, once the information about its prediction was removed, a higher error is achieved. For these samples, a reannotation process might be \begin{table}
\begin{tabular}{l c c c} \hline  & Angry & Calm & Happy \\ \hline Angry & 100 & 0 & 0 \\ \hline Calm & 0 & 100 & 0 \\ \hline Happy & 7.33 & 0 & 92.67 \\ \hline \end{tabular}
\end{table} 
Table 4: Confusion matrix with the percentage of correctly classified samples after profile transformation for each category (only correctly classified test samples). Each sample has been transformed to the profile of each class and therefore each row sums up to 100%.