# Research on Driving Style Recognition of Autonomous Vehicles Based on ACO-BP
## 4 Results  
### Model Parameter Setting  
Determining the optimal number of nodes in the hidden layer entails finding the right balance between fitting capacity, computational efficiency, and feature representation. As specified in Equation (19):  
\[m=\sqrt{n+l}+\alpha \tag{19}\]  
In Equation (19), \(m\) is the implicit layer's node count; \(n\) is the input layer's node count; \(l\) is the output layer's node count; and \(\alpha\) is an integer from 1 to 10. The evaluation criteria for BP neural networks are \(MSE\), \(RMSE\), and \(MAE\), which are used to compare the performance of the BP model with that of the ACO-BP model, as specified in Equations (20)-(22):  
\[MSE=\frac{1}{n}\sum_{i=1}^{n}(x_{i}-y_{i})^{2} \tag{20}\] \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Center of Clustering** & **Cluster I** & **Cluster II** & **Cluster III** \\ \hline
3 & 76 & 148 & 78 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: K-means clustering results. Figure 6: K-means clustering effect. \[RMSE=\sqrt{\frac{1}{n}\sum_{i=1}^{u}(x_{i}-y_{i})^{2}} \tag{21}\]  
\[MAE=\frac{1}{n}\sum_{i=1}^{u}|x_{i}-y_{i}| \tag{22}\]  
In Equations (20)-(22), \(n\) denotes the total number of samples; \(x_{i}\) denotes the i sample \(j\)'s true value; and \(y_{i}\) signifies the predicted value of the model for the same sample \(i\). The smaller the value of \(MSE\), \(RMSE\), and \(MAE\), the more reasonable the corresponding hidden layer's node count. Based on Equation (9), the range of the hidden layer's node count in the BP neural network is set between 3 and 12. Using MATLAB to increase or decrease the number of hidden layer nodes, it is determined that the hidden layer's node count is 8, and the corresponding mean square error is the smallest, as shown in Table 5. Therefore, the optimal hidden layer's node count for the BP neural network is 8. The remaining parameters are determined according to the actual learning rate and stability, and the learning rate is set to 0.01, the number of training times is 1000, and the minimum error of the training target is \(10^{-7}\). The parameter setting of the ant colony optimization (ACO) algorithm is mainly considered to determine the accuracy of the algorithm and the computing rate. After repeated validation experiments, the pheromone volatility coefficient is \(\rho=0.9\), the number of ants is 10, the momentum factor is 0.1, the learning rate is 0.01, the number of iterations is 1000, the transfer probability constant is 0.2, the total amount of pheromone release is 1, the weighting threshold takes the range of [-3, 3], and the maximum number of evolutionary generations is 50. The fitness function used for evaluating the performance of the training and test sets as a whole is the \(MSE\), which is represented by the following equation:  
\[F=\frac{MSE_{trainingSet}+MSE_{testingSet}}{2} \tag{23}\]  
In Equation (23), _trainingSet_ is the training set sample and _testingSet_ is the test set sample. The evolutionary convergence curve of the ant colony algorithm is shown in Figure 7. It can be observed that the convergence curve has a steep slope, indicating that the ant colony algorithm tends to stabilize at generation 29. This suggests a fast convergence rate and minimal fluctuations. The algorithm gradually stabilizes near a good solution within a smaller number of iterations, illustrating its fast convergence speed. The final convergence point of the convergence curve is (29, 0.083), which corresponds to 29 evolutionary generations. The lower \(MSE\) value indicates a better solution, suggesting that the algorithm has found a higher-quality optimal solution [38]. This validates the reasonableness of the selected parameters, which can be used as initial values for the algorithm's parameters.