## 2 Materials and Methods
### Methodology
#### 2.3.3 Deep Forest (DF) Algorithm  
DF is a multi-layer supervised algorithm based on decision trees. This algorithm is inspired by deep learning, and the overall framework consists of a cascade forest connected by layers and multi-grained scanning. DF has better performance compared to other decision-tree-based integrated learning algorithms and is applicable to differently sized training data [37]. DF has fewer hyperparameters and is easier for engineers to understand and control. Therefore, DF has higher data training efficiency, and the model is less prone to problems such as overfitting and underfitting during SRE grade identification. This can improve the accuracy of SRE grade identification and the generalization ability of the model.  
Multi-grained scanning is a technique that fully processes features. The data samples are passed through multi-scale sliding windows to obtain multiple feature subsamples. Then, multiple representation vectors are obtained using different RF transformations. Finally, they are concatenated to obtain the augmented feature vector matrix for the current multi-grained scanning [37]. It is assumed in Figure 10 that the original input contains ten features, and the sliding window size is set as 3 with a sliding step of 1. For three-class classification problems, each forest will generate 24 3-dimensional feature vectors and finally generate a 48-dimensional feature vector after concatenation.  
Cascade forest expands the feature matrix by adding new augmented feature matrices using multi-grained scanning. Each layer of the cascade forest is augmented by a combination of RF and complete random forest (CRF) for its generalization capability, as shown in Figure 11. Both RF and CRF are integrated learning consisting of multiclass decision trees, and the main principles of both algorithms have been described in detail in the previous literature [38; 39]. The difference mainly lies in the different strategies for dividing the eigenvalues of decision trees. RF selects the optimal eigenvalue division point according to principles, such as the Gini coefficient, while CRF selects a random eigenvalue division.  
Figure 10: Multi-granularity scanning structure (three classifications).  
Each forest is computed to produce an \(n\)-dimensional (\(n\) refers to the classification category) vector, reflecting the percentage of different categories on the leaf nodes. The \(n\)-dimensional vector is then merged with the original data to form a new training feature vector, which is used as input for the next cascade level, as shown in Figures 11 and 12. The cascade forest obtains the final prediction result from the mean of the probability vectors in the last level.  
It should be noted that cascade forest evaluates the performance of the entire model on the validation set when extending new levels. If there is no significant improvement, the training process stops. Therefore, the number of levels in the cascade model is determined adaptively for different training data sizes. In addition, cascade forest does not introduce new hyperparameters when increasing the model's depth. Thus, the overall number of hyperparameters is relatively lower, which is conducive to building and training the model.