# Machine Learning Sorting Method of Bauxite Based on SE-Enhanced Network
## 4 Bauvite Separation Test Results and Discussion
### Experimental Process  
In this paper, in order to generate a better bauxite separation model, we used the improved YOLOv4 network and set up two groups of controlled experiments of the data categories balanced and unbalanced to find the optimal model. The accuracy P and the average AP of each category were used to judge the network performance. When the \(IoU\geq 0.5\), the bauxite is detected correctly. In the YOLOv4 network, both batch and subdivisions were set to 64, which means that batch pictures were loaded into the memory at one time during the training process, and then the forward propagation process was completed in subsets; the maximum number of iterations of Max_Batches was set to 8000; the number of detection categories was set to 4. The experimental equipment includes AMD Ryzen 5 3600X 6-Core Processor, GeForce RTX 2060 graphics card, and 16G memory. Figure 5 shows the change of loss function of bauxite datasets in the process of the improved YOLOv4 network training. After 8000 training iterations, the loss function no longer shows a downward trend. In order to establish the best bauxite sorting model, we set 1000 - 8000 iterations for comparison, and then trained on the balanced and unbalanced bauxite category data, respectively. The training results are shown in Tables 3 and 4. \begin{table}
\begin{tabular}{c c} \hline
**Bauxite Category** & **Number of Pictures** \\ \hline No. 55(ks55) & 1000 \\ No. 65(ks65) & 400 \\ No. 70(ks70) & 479 \\ Nos. 72–73(ks723) & 310 \\ \hline \end{tabular}
\end{table} 
Table 1: Total data. \begin{table}
\begin{tabular}{c c c} \hline
**Dataset Type** & **Number of Training Sets** & **Number of Test Sets** \\ \hline category volume unbalanced datasets & 1751 & 438 \\ category volume balanced datasets & 1000 & 240 \\ \hline \end{tabular}
\end{table} 
Table 2: Sorted datasets. In order to enhance the visibility of the data, we visualized the above table in Figure 6. The left figure shows the training results of the category volume unbalanced datasets in the improved YOLOv4 network, and the right figure shows the training results of the category volume balanced dataset in the improved YOLOv4 network. Through longitudinal comparison and observation, it is easy to conclude that given the limited sample data, when the datasets are made into a balanced category of data volume, the effect of the model with the same training times is better. When the model iterates 7000 times, the network training results of the four types of ores are the best, and the average detection accuracy is about 99%. The inference speed of the network model is between 0.03 s and 0.05 s, and the training effect is the best. Therefore, we selected the category volume balanced datasets to train the model for 7000 times under the improved YOLOv4. The confusion matrix obtained under this network model is shown in Figure 7. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Number of**} & \multicolumn{4}{c}{**Bauxite Category**} & \multirow{2}{*}{**mAP**} \\ \cline{2-2} \cline{4-6}  & **No. 55** & & **No. 65** & & **No. 70** & **Nos. 72-73** \\ \hline
1000 & 98.63\% & 48.43\% & 88.23\% & 60.15\% & 73.86\% \\
2000 & 97.94\% & 98.18\% & 98.55\% & 93.65\% & 97.08\% \\
3000 & 98.21\% & 98.05\% & 98.51\% & 94.81\% & 97.40\% \\
4000 & 98.20\% & 98.18\% & 98.55\% & 96.55\% & 97.87\% \\
5000 & 98.21\% & 98.48\% & 98.55\% & 91.47\% & 96.68\% \\
6000 & 98.21\% & 99.81\% & 98.53\% & 93.80\% & 97.59\% \\
7000 & 98.20\% & 99.90\% & 98.55\% & 99.81\% & 99.12\% \\
8000 & 98.21\% & 98.48\% & 98.55\% & 93.09\% & 97.08\% \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Training results of improved YOLOv4 network for balanced category datasets. Figure 5: The abscissa represents the training iterations; the ordinate represents the total network loss. Figure 6: Abscissa represents the number of model iterations; ordinate represents the model training results, and different colors represent different types of bauxite.