# Cost-Sensitive Variational Autoencoding Classifier for Imbalanced Data Classification
## 4 Experimental Setup and Analysis of Results
### Experimental Results and Analysis
#### 4.5.3 Influence of Cost Matrix of Correct Domain Knowledge Embedding on F1-score  
To verify whether the correct sensitivity factors (_High, Medium_, and _Low_, which follow _High \(>\) Medium \(>\) Low_) would have a more positive impact on the experimental results, we tested the experimental results when the cost matrix was correct, and when the cost matrix was not in accordance with the reality. There were 27 possible scenarios of the cost matrix; all scenarios of the cost matrix are presented in Table A1 of Appendix B and five typical scenarios of them are listed in Table 5. The results of all experiments are shown in Table A2 of Appendix C, and Table 6 lists the six typical scenarios of them. The Precision, Recall, and F1-score of the result are shown in Figures A1-A3 of Appendix A more clearly.  
It may be observed from the experimental results that, when the cost matrix was not embedded with domain knowledge, the F1-score, Recall, and Precision of the three types were reduced, which means that the embedding of domain knowledge into the cost matrix was effective.  
Comparing the results of Error2 and Correct, the cost of CRA in Error1 was set to L and that of the other two were set to H; thus, the Recall, Precision, and F1-score for CRA in Error1 became smaller. Comparing the results of Error3 and Correct, Error3 set the cost of RMG as H and the cost of the other two as L, which was furthest from the actual domain knowledge; thus, the experimental result of this item was the worst. Comparing the results of Error5 and Correct, the cost of the BMG class in Error5 was set as L, and the cost of the other two categories was set as H; thus, the Recall and F1-score for BMG in Error1 became smaller.  
\begin{table}
\begin{tabular}{l c c c c c c c c c} \hline \hline  & \multicolumn{3}{c}{**Precision**} & \multicolumn{3}{c}{**Recall**} & \multicolumn{3}{c}{**F1-score**} \\ \hline  & **BMG** & **CRA** & **RMG** & **BMG** & **CRA** & **RMG** & **BMG** & **CRA** & **RMG** \\ \hline Correct & 0.9409 & 0.8313 & 0.8976 & 0.9200 & 0.7809 & 0.9239 & 0.9303 & 0.8734 & 0.9106 \\ Error1 & 0.8807 & 0.7221 & 0.7816 & 0.8533 & 0.4504 & 0.9091 & 0.8668 & 0.7823 & 0.8405 \\ Error2 & 0.9254 & 0.7745 & 0.7526 & 0.6252 & 0.4227 & 0.9401 & 0.7462 & 0.6919 & 0.8360 \\ Error3 & 0.9106 & 0.7360 & 0.7531 & 0.6637 & 0.4149 & 0.9277 & 0.7678 & 0.6980 & 0.8313 \\ Error4 & 0.8523 & 0.7863 & 0.8331 & 0.6667 & 0.7113 & 0.8994 & 0.7481 & 0.7216 & 0.8650 \\ Error5 & 0.9062 & 0.7821 & 0.8108 & 0.6296 & 0.6476 & 0.9142 & 0.7430 & 0.6976 & 0.8594 \\ \hline \hline \end{tabular}
\end{table}
Table 6: F1-score, Recall, and Precision of different cost matrices.  
\begin{table}
\begin{tabular}{l c c c c c c c c c} \hline \hline  & \multicolumn{3}{c}{**Correct**} & \multicolumn{3}{c}{**Error1**} & \multicolumn{3}{c}{**Error2**} \\ \hline  & **BMG** & **CRA** & **RMG** & **BMG** & **CRA** & **RMG** & **BMG** & **CRA** & **RMG** \\ \hline BMG & 1 & H & H & 1 & H & H & 1 & H & H \\ CRA & M & 1 & M & L & 1 & L & L & L & 1 & L \\ RMG & L & L & 1 & L & L & 1 & H & H & 1 \\ \hline  & \multicolumn{3}{c}{**Error3**} & \multicolumn{3}{c}{**Error4**} & \multicolumn{3}{c}{**None**} \\ \hline  & **BMG** & **CRA** & **RMG** & **BMG** & **CRA** & **RMG** & **BMG** & **CRA** & **RMG** \\ \hline BMG & 1 & L & L & 1 & L & L & 1 & L & L \\ CRA & L & 1 & L & H & 1 & H & H & 1 & H \\ RMG & H & H & 1 & L & L & 1 & H & H & 1 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Different cost matrix configurations. Here, there is one correct configuration from domain knowledge, and the other five (Error1–Error5) were not correct. H: _High_, M: _Medium_, L: _Low_.