## 4 Results and Discussions  
_The ANN-PSO Model Results and Discussions_  
The 434 traffic datasets obtained from the seven roadsites were divided into 367 and 70 for training and testing. To achieve the best optimum output, the trial-and-error approach was used to discover the best value for the number of hidden nodes, iterations, and acceleration factors. Sigmoid and linear functions were used for the ANN-PSO model  
\begin{table}
\begin{tabular}{c c c c} \hline
**Roadsites** & **Training** & **Testing** & **Total** \\ \hline Brakfontein IC N1 SB (Roadsite 1852) & 51 & 10 & 61 \\ Old Johannesburg road SB off-ramp (Roadsite 1854) & 64 & 10 & 74 \\ Samrand Avenue SB off-ramp (Roadsite 1856) & 54 & 10 & 64 \\ Olifantsfn SB off-ramp (Roadsite 1858) & 50 & 10 & 60 \\ New road SB off-ramp (Roadsite 1860) & 47 & 10 & 57 \\ Allandale road SB IC off-ramp (Roadsite 1862) & 64 & 10 & 74 \\ Allandale road SB on-ramp (Roadsite 1863) & 34 & 10 & 44 \\ \hline  & 364 & 70 & 434 \\ \hline \end{tabular}
\end{table}
Table 5: The Breakdown of the Roadsites traffic datasets for ANN-PSO training.  
for the hidden and output node activation functions. The best optimal parameters for both training and testing performance of the ANN-PSO model of traffic flow at each roadsites, as shown in Table 6, are:  
\begin{tabular}{l l l l l l} \hline \hline
**Number of Neurons** & **Swarm Population Size** & \(\mathbf{C_{1}}\) & \(\mathbf{C_{2}}\) & **Training (\(\mathbf{R^{2}}\))** & **MSE** & **Testing (\(\mathbf{R^{2}}\))** \\ \hline  
75 &simulated traffic volume to determine the ANN-PSO model's validity of each roadsites traffic dataset.  
The study set out to determine if an artificial network trained by particle swarm optimization can be used to model traffic flow at a signalized road intersection. The current study has been able to answer that question, considering Table 6, which shows evidently that the ANN-PSO model is capable of modelling traffic flow at a signalized road intersection. The most interesting finding from the ANN-PSO results shows that the best optimum training and testing performed for the roadsites was obtained with a different number of neurons, swarm population sizes, and acceleration factors \(C_{1}\) and \(C_{2}\). From the results, it can be concluded that the ANN-PSO's parameters affect the performance prediction of the traffic flow datasets. Another significant finding from the ANN-PSO result is that the accelerating factors and mean square error plays an essential role in determining the optimum performance of each ANN-PSO model on each roadsites; for example, the lower the \(MSE\), the more likely there is going to be an optimum training or testing performance of the ANN-PSO model. The most striking result to emerge from the research study is that when an ANN-PSO model comprises the maximum correlation coefficient (\(R^{2}\)) and the minimum \(MSE\), it can be said that the ANN-PSO model is superior. The training and testing performance regression value for the roadsites indicates that the inputs and target are well correlated. Another significant finding is that when R-value is closer to 1, this means that there is an accurate linear relevance between the traffic inputs and target.  
Figure 9: (**a**) ANN-PSO training response of the best performance neural network of the traffic datasets of the roadsites (13-5-1). (**b**) Comparison between the measured and predicted traffic volume of the roadsites for the testing performance of the ANN-PSO model.