# Cost-Sensitive Variational Autoencoding Classifier for Imbalanced Data Classification
## 4 Experimental Setup and Analysis of Results
### Experimental Results and Analysis  
#### 4.5.1 Classification Performance of Cost-Sensitive VAE  
To demonstrate the performance of the cost-sensitive VAE classifier proposed in this paper on the imbalanced data classification task, the comparative experiments conducted are outlined in this subsection. The cost-sensitive VAE classifier was compared with SVM, \(k\)-nearest neighbour, decision tree, Bayesian classifier, and random forest for the classification of bulk amorphous materials data. The parameters of each algorithm are listed in Table 2. The default parameters were used for all models in the experiment. Table 3 lists the F1-score, Recall, and Precision of each dataset class in each algorithm. It can be seen that, for the BMG class, the F1-score and Precision obtained by the cost-sensitive VAE algorithm were the highest, the Recall obtained by the random forests algorithm was the highest, and the Recall obtained by the cost-sensitive VAE algorithm was not significantly different from the highest value. For the CRA class, the F1-score, Recall, and Precision obtained by the cost-sensitive VAE algorithm were all the highest. For the RMG class, the F1-score and Precision obtained by the cost-sensitive VAE were \begin{table}
\begin{tabular}{c c} \hline \hline
**Algorithm** & **Main Parameters** \\ \hline Support Vector Machine & C = 1.0, Kernel = \textbackslash{}rf\textbackslash{}rf\textbackslash{}rf\textbackslash{}rf \\ K-Nearest Neighbour & N Neighbours = 5 \\ Decision Tree & Criterion = \textbackslash{}g\textbackslash{}gin\textbackslash{}i\textbackslash{}rf \\ Bayes & Priors = None \\ Random Forest & N Estimators = 10 \\ Cost-Sensitive VAE & L = 15, \(\alpha=25\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Main parameters used in different learning algorithm. \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 & 0.9427 & 0.8016 & 0.9184 & 0.9259 & 0.7318 & 0.9428 & 0.9601 & 0.7651 & 0.8953 \\ Support Vector Machine & 0.8017 & 0.6408 & 0.8604 & 0.6919 & 0.5271 & 0.9458 & 0.9531 & 0.8172 & 0.7892 \\ K-Nearest Neighbour & 0.9210 & 0.7497 & 0.8968 & 0.9244 & 0.6765 & 0.9328 & 0.9176 & 0.8407 & 0.8635 \\ Decision Tree & 0.8835 & 0.7417 & 0.8790 & 0.8933 & 0.7403 & 0.8805 & 0.8739 & 0.7539 & 0.8775 \\ Bayes & 0.4619 & 0.5784 & 0.6167 & 0.7274 & 0.6488 & 0.5208 & 0.3384 & 0.5218 & 0.7516 \\ 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 3: F1-score, Recall, and Precision of different algorithms. the highest, the Recall obtained by the random forests algorithm was the highest, and the Recall obtained by the cost-sensitive VAE algorithm was not significantly different from the highest value. As can be seen from the results, compared with other algorithms favoring a certain index in a certain category, the cost-sensitive VAE algorithm performed well overall in terms of the F1-score, Precision, and Recall in all kinds of categories. Among the five comparison methods selected above, the SVR and RF are commonly used and available in versions that accommodate data imbalance. There is a \"class weight\" parameter in RF and SVR that adjusts the weights of different classes. For fairness of comparison, a comparison experiment is also performed to compare the csVAE with the versions of these two algorithms that accommodate imbalanced data. The recently proposed density-based random forest algorithm (DBRF) [36] was also added in the comparison. The \"class weight\" parameter in the RF was set to \"class weight = 0:12, 1:5, 2:2\" according to the ratio of the three classes in the dataset used in this study(BMG:CRA:RMG = 1:2.29:5.49).