*3.2. Experimental Results*

Firstly, Figure 5a,b show the comparison curves for the classification accuracy of each algorithm based on the data in Table 3 for the training set and test set, respectively, from which we can intuitively see that the curve for ASGS-CWOA-BP is better than that of the others, except for the pink curve corresponding to RF on the training set, which means that, on the whole, ASGS-CWOA-BP has the best performance in the classification of coal gangue images using RN-CGI.

It can be clearly seen from Figure 5c that the ASGS-CWOA-BP curve is higher than the GA-BP curve in both the training set and the test set, which means that ASGS-CWOA-BP is better than GA-BP in terms of the accuracy of classifying coal gangue images using RN-CGI. In the same way, ASGS-CWOA-BP is better than PSO-BP and LWCA-BP, as shown in Figure 5d,e, respectively. The principle is that these four methods are based on the same intelligent algorithm to optimize the weight of the BP neural network; however, their classification results are not consistent, which shows that the optimization ability of these four intelligent algorithms is different and that the ability of ASGS-CWOA-BP is the best.

Additionally, Figure 5f indicates that the ASGS-CWOA-BP had better performance than the original BP depending on gradient descent for the classification of coal gangue images using RN-CGI, whether on the training set or the test set. In fact, BP depending on gradient descent had the worst performance compared with GA-BP, PSO-BP, LWCA-BP and ASGS-CWOA-BP, which are based on an intelligent algorithm to optimize the weight of the BP neural network, which shows the inherent deficiency of gradient-descentbased BP resulting from limitations by the degree of the gradient descent because of some particularity of the problem to be solved, while intelligent algorithm-based BPs are not subject to such restrictions.

**Figure 5.** *Cont.*

**Figure 5.** Classification accuracy comparison curve. (**a**) Comparison on the training set; (**b**) comparison on the test set; (**c**) ASGS-CWOA-BP vs. GA-BP; (**d**) ASGS-CWOA-BP vs. PSO-BP; (**e**) ASGS-CWOA-BP vs. LWCA-BP; (**f**) ASGS-CWOA-BP vs. BP; (**g**) ASGS-CWOA-BP vs. RF. Red: ASGS-CWOA-BP; green: GA-BP; black: PSO-BP; blue: LWCA-BP; cyan: original BP based on gradient descent; pink: RF. Circles indicate data from the training set while \* indicates data from the test set.

**Table 3.** Experimental records.


In particular, RF was used as a comparison algorithm to analyze the performance of BPs. It can be seen that RF has a very good curve for the training set but a poor one for the test set (Figure 5g), which means that the model trained by RF will be overfitted due to the small dimensions of the feature vectors, which also shows the superiority of the algorithm proposed in this study.

Finally, the best record, average and variance of the classification accuracy are shown in Figure 6a–c, respectively, from which we can see that the proposed method was better for the best value of classification accuracy than any algorithm except RF on the training set, as well as for the average value. However, the variance of ASGS-CWOA-BP was not better than that of LWCA-BP and RF on the training set, while it was better than that of GA-BP, PSO-BP and BP, as shown in Figure 6c. However, the variance of ASGS-CWOA-BP was less than that of GA-BP, PSO-BP and LWCA-BP and was basically the same as that of BP, although it was a little worse than RF. Thus ASGS-CWOA-BP had the best performance of in terms of the best value and high robustness.

**Figure 6.** Statistical analysis of the classification accuracy. (**a**) Best recorded classification accuracy; (**b**) average classification accuracy; (**c**) variance of the classification accuracy.
