# Research on Hard Rock Pillar Stability Prediction Based on SABO-LSSVM Model
## 3 Model Construction and Optimal Selection of Dataset Balancing Methods
### Workflow for Balancing Dataset  
In the process of comparing the predictive performance of different optimization models, the dataset was balanced using the Smote oversampling algorithm to effectively improve the overall prediction efficiency. Using only one sampling method inevitably leads to suboptimal or even negative effects on optimization. Therefore, after completing a comprehensive comparison of various models, to further improve the prediction accuracy of the best model, this study attempted to use multiple sampling methods and select the optimal one. As described in the Materials and Methods Section, the main focus of this research was on the Smote, Adasyn, and Tomek-Smote sampling methods.  
Both Smote and Adasyn are oversampling interpolation algorithms that share the same basic principles. The main tool used in these two methods was MATLAB R2021b. The original dataset was imported into the main file, and a balanced dataset was obtained after code execution. During the interpolation process, Smote uniformly generates new data for all minority class samples, whereas Adasyn adaptively generates new samples by focusing on minority class samples that are difficult to classify correctly. It automatically adjusts the number of newly generated samples to make the model pay more attention to samples in the boundary region.  
Tomek-Smote is a combination of oversampling and under-sampling methods. Implementing this sampling method required the use of Python tools (v.3.11), including sampling functions in the imblearn and sklearn libraries. Unlike the individual sampling methods, the Tomek-Smote sampling method consists of two steps.  
1. Preliminary oversampling using Smote. Similar to the individual Smote oversampling method, new sample points were constructed through linear interpolation between minority class samples until the imbalance between different classes was resolved.
2. Cleaning noise and boundary data using Tomek Links. Tomek Links pairs on class boundaries were identified and removed based on the minimum geometric distance principle to achieve a new balance.  
The dataset used in this study included five parameter combinations: M-1, M-2, M-3, M-4, and M-5. After completing the model optimization step, the best-performing combination among these five was also required for further research on sampling methods.  
Taking the M-3 combination as an example, this dataset contained five pillar features: pillar width (W), pillar height (H), pillar width-to-height ratio (K), uniaxial compressive strength of the rock (UCS), and pillar stress (\(\sigma\)). It included 162 sample cases with proportions of 35.80%, 22.84%, and 41.36% for \"stable\", \"unstable\", and \"failure\" samples, respectively. It is evident that the \"unstable\" pillar samples were significantly underrepresented among these three classes, indicating the need to balance the dataset.  
It can be observed from the pie chart in Figure 8 that after balancing the default dataset, the pillar samples in the three categories appeared to be evenly distributed. Among the Smote group, the sample distribution was the most balanced, while the Adasyn and Tomek-Smote groups, although not entirely equal, also exhibited a relatively balanced distribution at a 1:1:1 ratio.