# Cost-Sensitive Variational Autoencoding Classifier for Imbalanced Data Classification
## 4 Experimental Setup and Analysis of Results
### Design of Cost Sensitive Factor  
This experiment involved three categories of classification. Its purpose was to classify the material dataset; that is, to identify the phase formation of the samples, including BMG, RMG, and CRA. Therefore, the cost matrix was a \(3*3\) matrix, which is listed in Table 1. The diagonal element in the table was set to one instead of zero to prevent the cost of the classification task from being excessively small (i.e., preventing the value of \(L(\hat{y},y)\) from being excessively small), resulting in a serious imbalance in the importance ratio of the three tasks of calculating the distribution of hidden variables, reconstruction of input data, and classification of the data. When the main diagonal element of the cost matrix is set to zero, if the number of correctly classified samples is too large, the value of \(L(\hat{y},y)\) will be too small. Thus, the proportion of the classification task in the total task was accordingly reduced, and the classification task was ignored, which, in turn, led to the number of correctly classified samples and the classification performance being reduced. As shown in the previous section, the cost-sensitive VAE classifier assigns different cost-sensitive factors to the three types of samples, as shown in Table 1, where \(High>Medium>Low\). In this paper, the determination of the value of the three parameters \(High\), \(Medium\), and \(Low\) is mainly based on the method of domain knowledge embedding, and the relationship between the size of each misclassification cost is confirmed by analyzing the possible consequences of mutual misclassification between the categories. Relationships are then established between the three, and the values of the three are obtained through a grid search method. Among the three categories of experimental data, BMG is bulk metallic glass, which is an amorphous material with a large diameter. RMG is an amorphous material. RMG is a ribbon metallic glass with a small diameter. CRA is a crystalline material. The misclassification cost between BMG and CRA is very high because BMG is an amorphous material and CRA is a crystalline material, and the diameter of BMG is very large. Considering that the number of BMG samples is less than that of CRA samples, on the basis of the high cost of misclassification between BMG and CRA, the cost of the misclassification of BMG as CRA is set to \"\(High\)\", and the cost of the misclassification of CRA as BMG is set to \"Medium\". On the one hand, it shows that the overall misclassification cost of the two categories is high. On the other hand, it shows that BMG is a minority class and needs to be given a higher cost. The misclassification cost between BMG and RMG is relatively small because they are both amorphous materials, and there is a gap in the material morphology. Considering that the number of BMG samples is small and that it is the most relevant category in real tasks, on the basis of the small misclassification cost between BMG and RMG, the cost of the misclassification of RMG as BMG is set to \"\(Low\)\" and the cost of the misclassification of BMG as RMG is set to \"\(High\)\". Thus, the misclassification cost of the combination of the two is small, but it is biased toward the minority class. The misclassification cost between the CRA and the RMG is also relatively small. Although CRA is a crystal and RMG is an amorphous material, the diameter of the RMG material is very small, and there is a relatively small gap between CRA and RMG. Therefore, the cost of misclassification between RMG and CRA is less than that between BMG and CRA. Due to the fact that the number of CRA samples was less than that of RMG, based on the small misclassification cost between CRA and RMG, we set the misclassification cost of CRA as RMG as \"\(Medium\)\" and the misclassification cost of RMG as CRA as \"\(Low\)\". This not only shows that the misclassification cost between CRA and RMG is relatively small, but also shows that the cost matrix is biased toward a few classes.