# Cost-Sensitive Variational Autoencoding Classifier for Imbalanced Data Classification
## 4 Experimental Setup and Analysis of Results
### Experimental Results and Analysis
#### 4.5.2 Impact of Different Cost-Sensitive Factor \(\alpha\)  
To further demonstrate the contribution of the cost matrix to the classification performance of the minority classes, this experiment was conducted to verify its effect on the final experimental results by changing the value of the cost-sensitive factor \(\alpha\). In the previous content, a relationship was established between _High_, _Medium_, and _Low_ in the cost matrix, i.e., _High_ = \(\alpha*\alpha*Low=\alpha*Medium\). Keeping _Low_ constant, as \(\alpha\) increases, the corresponding cost increases, and the increase in the cost of misclassification is greater for the minority classes. Figure 6 shows the changes in F1-score, Recall, and Precision for BMG, CRA, and RMG with different cost-sensitive factor \(\alpha\).  
\begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline  & \multicolumn{3}{c}{**F1-score**} & \multicolumn{3}{c}{**Recall**} & \multicolumn{3}{c}{**Precision**} \\ \hline  & **BMG** & **CRA** & **RMG** & **BMG** & **CRA** & **RMG** & **BMG** & **CRA** & **RMG** \\ \hline Random Forest (Imbalanced) & 0.9380 & 0.7826 & 0.9038 & 0.9529 & 0.9237 & 0.7748 & 0.9098 & 0.79058 & 0.8979 \\ Support Vector Machine (Imbalanced) & 0.75 & 0.6536 & 0.7844 & 0.9389 & 0.7185 & 0.7188 & 0.6244 & 0.5994 & 0.8631 \\ DBRF & 0.9430 & 0.8225 & 0.9163 & 0.9437 & 0.8209 & 0.9169 & 0.9423 & 0.8241 & 0.9157 \\ Cost-Sensitive VAE & 0.9432 & 0.8809 & 0.9213 & 0.9230 & 0.8209 & 0.9299 & 0.9644 & 0.8426 & 0.9129 \\ \hline \hline \end{tabular}
\end{table}
Table 4: F1-score, Recall, and Precision of different algorithms.  
It may be observed from the results that, in terms of the F1-score, in general, the F1-score of the BMG class was the largest, because the cost associated with the BMG class was the largest, which compensated for the shortcoming of the BMG samples being the fewest. Although the cost-sensitive factor associated with the RMG class was the smallest Low, the maximum number of RMG samples made up for the low-cost factor and the F1-score of the RMG class was the second. The F1-score of the CRA class was the smallest because the sensitive factors related to CRA were not the largest and the number of CRA samples was small.  
In terms of Precision, the Precision for the BMG class was the largest, the Precision for the RMG class was the second largest, and the Precision for the CRA class was the smallest. This result is consistent with that described in the previous paragraph. BMG exhibited a high misclassification cost and RMG had the most sample data; thus, the Precision for both was high, whereas CRA had fewer sample data and no high misclassification cost to compensate for the small number of samples; thus, the Precision was the smallest.  
In terms of Recall, the Recall for the RMG class was the largest, the Recall for the BMG class was the second largest, and the Recall for the CRA class was the smallest. Precision and Recall are usually a pair of relative contradictory measures. When the Precision ratio is high, the Recall ratio tends to be low, and vice versa. Therefore, in this experiment, the F1-score and Precision for BMG were the highest, and its Recall became smaller accordingly.  
From the perspective of change trend, with an increase in the cost-sensitive factor \(\alpha\), all types of F1-score, Recall, and Precision showed an upward trend, indicating that the cost-sensitive matrix plays a positive role in the algorithm. As a result of the higher misclassification cost of samples in BMG and CRA, they were more affected by cost-sensitive factor \(\alpha\), and the change trend of the three indicators in BMG and CRA was greater than  
Figure 6: F1-score, Recall, and Precision under different cost sensitive factors \(\alpha\).  
that of the three indicators in RMG. With the increase in the cost-sensitive factor \(\alpha\), the F1-score, Precision, and Recall for BMG increased from less than that for RMG to greater than that for RMG.