## 2 Methodology
### Oversampling and Cost-Sensitive  
While ML as a data-driven approach is efficient to run, the sample size of the dataset and the quality of the data are critical to a highly accurate model. Due to the multi-principal structure and four core effects of HEAs, the data from previous studies are mostly single-phase SS, which results in a sparse distribution of alloy phase types, thus causing the issue of class imbalance. As a result, when constructing a ML model, the number of single-phase SS samples is much larger than the number of mixed-phase samples, making it impossible for traditional classification algorithms to achieve good results. In our dataset, there are only 74 mixed-phase samples of BCC+FCC, which may also lead to a class imbalance. How to optimize the model and improve the prediction accuracy for the dataset with the class imbalance has become urgent. Oversampling may change the distribution of the original dataset by adding a small number of classes of samples and transforming the dataset from imbalance to balance. In fact, many studies [27; 28] have used random oversampling to address the imbalance in the alloy phase data classes. But random oversampling is done by replicating a few classes of samples to increase their proportion of data, which often increases the risk of overfitting [37] and certainly has a negative impact on decision-making. Some studies performed random oversampling on the dataset before it was divided into training and test sets, which undoubtedly caused data leakage and severely overestimated the prediction accuracy. Unlike random oversampling, which balances data by copying existing samples, the Synthetic Minority Oversampling Technique (SMOTE) uses adjacent samples to generate new minority-class samples to resolve the data imbalance issue, effectively avoiding sample duplication. Specifically, the SMOTE algorithm treats a small number of classes of samples as feature vectors and generates new synthetic samples by randomly selecting two adjacent sample points in the feature space for interpolation operations. Because SMOTE may produce the same amount of synthetic data when generating samples from multiple minority classes, it is possible for samples to overlap between different classes. To solve the sample overlap problem, Borderline-SMOTE, Adaptive Synthetic Sampling (ADASYN) and other adaptive synthetic sampling were proposed. Unlike SMOTE, which generates synthetic samples in each minority-class sample, Borderline-SMOTE generates synthetic samples only for the minority-class samples adjacent to the boundary, which can reduce the generation of noisy samples and improve the classification accuracy. The SVM-SMOTE algorithm is a variant of Borderline-SMOTE that involves first training an SVM classifier and then restricting the generation of new synthetic samples based on the boundary information of the classifier. Therefore, the new samples generated by SVM-SMOTE are closer to the real data distribution. ADASYN decides how many synthetic data to generate based on the contribution of the samples, which not only adaptively generates a few classes of more samples but also optimizes them for different data distributions, thus improving the quality and quantity of the generated samples and further enhancing the model performance.  
Cost-sensitive learning (CS) is also used to solve data imbalances by assigning different costs to different classes of misclassifications in order to deal with an imbalanced dataset more efficiently. Under the CS strategy, the minority-class samples are paid more attention to when they are classified, and the minority-class samples are correctly classified as much as possible. For misclassification of minority-class samples as majority-class samples, a higher cost is assigned to compensate for the consequences of misclassification. In this way, the risk of overfitting the model to the majority-class samples can be effectively reduced, and the identification ability and generalization ability of the model to the minority-class samples can be improved.