# Lithological Mapping Research Based on Feature Selection Model of Relief-RF
## 3 Material and Methods
### Feature Selection and Lithological Mapping Method  
(1) ReliefF  
Relief algorithms are efficient filtering feature selection algorithms; they were proposed by [PERSON] and [PERSON] [52] for binary classification problems in 1992. Furthermore, relief algorithms are widely used because of their relative simplicity, high operation efficiency and satisfactory results. However, only two classes of data can be processed. [PERSON] [53] analysed and extended the Relief algorithm to the ReliefF algorithm in 1994 to address noise, incompletion and multiclass problems. Instead of using a single nearest neighbour, ReliefF averages the contribution of k-nearest neighbours from the same and opposite class of each sampled instance to smooth the influence of noise in the data. The selection of the number of nearest neighbours is the primary difference between Relief and ReliefF; this process ensures greater robustness of the algorithm with regard to noise. A user-defined parameter k controls the locality of the estimates. This parameter is set heuristically; for most purposes, k can be safely set to 10 [25]. The ReliefF method was performed in Matlab 2021 for preliminary feature selection. (2) Random Forest  
RF, proposed by [PERSON] in 2001 [54], is a popular supervised classification technique. It uses a bagging algorithm to generate numerous new training datasets and a decision tree algorithm to identify the probability of each class within each decision tree. RF obtains a class vote from each tree and classifies them according to a majority vote [23]. In order to produce forest trees, two parameters need to be set up: the number of decision trees (Ntree) and the number of variables to be selected and tested for the best split when growing the trees (Mtry). In this study, the number of trees was 500; the Mtry parameter is usually set to the square root of the number of input variables [55,56]. In RF, the ranking of feature importance is implemented as follows: a classification and a regression tree are initially built to generate the out-of-bag (OOB) sample data. On the basis of the OOB data, the RF verifies the importance of the input data and obtains the importance score of each feature, which is expressed by the mean decrease accuracy (MDA). The principle is to turn the value of a feature parameter into a random number, calculate its impact on the accuracy of the model and measure the importance of this parameter based on the MDA obtained from multiple calculations. The higher the value is, the more \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Stratigraphic Chronology** & **Area (km2)** & **Training Samples** & **Test Samples** \\ \hline Q\({}^{\text{pl}}\)4 & 3.79 & 1711 & 567 \\ Q\({}_{\text{3}}\)P1 & 24.14 & 2945 & 949 \\ Q\({}_{\text{1q}}\) & 4.63 & 1239 & 357 \\ N\({}_{\text{2y}}\) & 1.72 & 1447 & 175 \\ E\({}_{\text{3g}}\) & 19.56 & 3227 & 1337 \\ E\({}_{\text{1-21}}\) & 6.73 & 1718 & 620 \\ K\({}_{\text{qn}}\) & 7.84 & 2348 & 876 \\ \(Z^{2}\)dx & 1.68 & 1099 & 384 \\ \(Z^{\text{1b}}\)dx & 4.95 & 2331 & 778 \\ Z\({}^{\text{1a}}\)dx & 5.48 & 1078 & 376 \\ J\({}_{\text{3h}}\) & 4.05 & 1360 & 519 \\ J\({}_{\text{1-2}}\) & 6.80 & 1480 & 629 \\ C\({}_{\text{3 ah}}\) & 0.97 & 1212 & 478 \\ C\({}_{\text{3 ah}}\) & 6.78 & 1345 & 415 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The training samples and testing samples of each lithological unit. important the variable [57; 58]. The RF classifier was utilised for lithological mapping and feature selection based on Matlab 2021. The advantages offered by the two algorithms were combined in this study. Firstly, Relieff was used to remove part of the noise and redundant features. This step helped to improve the quality of the datasets and reduce the complexity of the classification model. Then, the former dataset was further screened to obtain the final dataset by using the importance sorting function of the RF method. (3) Support Vector Machine  
SVM is a supervised machine learning algorithm developed by [PERSON] [59].