## 4 Results and Discussion
### Intelligent Detection of UAV Images
#### 4.2.2 Magnetite Identification  
This study employs the Random Forest and Support Vector Machine (SVM) methods to predict ore grades in remote sensing images of the mining area, constructing a model that links sample spectral features with ore grades for the intelligent identification of magnetite (iron grade). A total of 329 samples collected during the second phase were selected as the training and prediction set for the machine learning algorithms. Ore with an iron grade greater than 20% in the Yanshan Iron Ore Mine is labeled as effective ore, while the remaining is considered waste rock. In fact, considering that grade is a continuous variable rather than a discrete one, the 20% grade threshold is an arbitrary cutoff. Therefore,  
Figure 13: The Spearman correlation map of bands and band ratios. (The red box is the feature correlation coefficient with high correlation with Fe element, positive number is positive correlation, negative number is negative correlation). ores with grades around 20% show little difference, and it is challenging to effectively distinguish such ores using spectral features. To enhance the representativeness of the training samples, this study randomly samples 30 times. In each iteration, two-thirds of the samples with scores lower than 10% are randomly selected as negative samples, while all samples with scores higher than 30% are used as positive samples. However, since there are only 29 positive samples, and two-thirds of the negative samples total 94, to maintain the balance between positive and negative samples, the SMOTE algorithm [62] is used to generate artificially synthesized negative samples for training. These positive, negative, and synthetic samples are then merged to form the training set for the model. After each random sampling, the training results are statistically analyzed, and the optimal result is selected as the prediction model for the intelligent identification of magnetite. Furthermore, Bayesian optimization is used to fine-tune the hyperparameters during each model training process. The search space for the hyperparameters of the optimal Random Forest and Support Vector Machine models and the best parameters selected through Bayesian optimization are shown in Table 4.  
Based on the evaluation results of the training models after 30 rounds of random sampling for both Random Forest (RF) and Support Vector Machine (SVM), the AUC value of SVM12 is notably higher than that of the other SVM models (Figure 14a). In contrast, the AUC values of the RF models are primarily distributed within the range of 0.836 to 0.852, with RF23 showing a slightly higher AUC than the other RF models (Figure 14c). The overall stability of the Random Forest method is superior to that of the Support Vector Machine. A comparison of the confusion matrix results for SVM12 and RF23 (Figure 14b,d), as well as the evaluation metrics, including accuracy, recall, \(F1\) score, and AUC, reveals that while RF23 and SVM12 are similar in accuracy, RF23 outperforms SVM12 in all other metrics. Specifically, RF23 shows significant improvements in recall and AUC (Table 5; Figure 15). These results demonstrate that Random Forest provides superior performance in magnetite recognition compared to Support Vector Machine. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Method** & **Parameters** & **Skopt Best Parameter** & **Search Range** \\ \hline SVM & C & 0.79 & \
\begin{tabular}{c} [\(1\times 10^{-6}\), \(1\times 10^{6}\)] \\ (log-uniform) \\ \end{tabular} \\ RF &
\begin{tabular}{c} kernel \\ n\_estimators \\ \end{tabular} & 500 & [10, 500] \\  & max\_depth & 50 & [5, 50] \\  & min\_samples\_split & 2 & [2, 20] \\  & min\_samples\_leaf & 1 & [1, 20] \\  & criterion & gini & [gini, entropy] \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Hyperparameter adjustments of SVM and RF.