## 2 Short-Term Traffic Flow Prediction Model Construction
### Construction of SVR Short-Time Traffic Flow Prediction Model Based on Associated Roads
#### 2.2.4 Parametric Optimization
If the performance metrics on the test set are close to the average performance metrics in cross-validation, the model has good generalization ability. We tested various parameter combinations and recorded the performance metrics (e.g., RMSE, MAE, MRE) for each combination. This is shown in Table 4. \begin{tabular}{c c c c c c} \hline \hline \(\gamma\) & **C** & \(\epsilon\) & **RMSE** & **MAE** & **MRE** \\ \hline
0.1 & 0.1 & 0.01 & 15.2 & 8.5 & 0.16 \\
0.1 & 0.2 & 0.01 & 14.8 & 8.3 & 0.15 \\
0.1 & 0.3 & 0.01 & 14.5 & 8.1 & 0.14 \\... &... &... &... &... &... \\
0.8 & 1.2 & 0.1 & 11.422 & 7.017 & 0.139 \\
0.9 & 1.2 & 0.1 & 11.5 & 7.1 & 0.14 \\
1.0 & 1.2 & 0.1 & 11.6 & 7.2 & 0.14 \\ \hline \hline \end{tabular}   
(1) Nuclear parameters  
By setting \(\text{C}=10,\epsilon=0.01\), so that it varies gradually between (0, 10). Through parameter comparison experiments, with the setting of \(\text{C}=10\), the prediction error shows a gradual decrease as \(\gamma\) gradually increases from 0 to 10, while the training error gradually increases in that interval. However, as \(\gamma\) continues to increase to 10, the prediction error gradually increases while the training error gradually decreases. The change curves are shown in Figures 6 and 7. (2) The penalty parameter C  
By setting \(\gamma=(1,8)\), in the interval from 0 to 200, C constantly changes. At the beginning of the rise in the value of C in the interval, the change in the value of C is still within a small range, but then the training and prediction and, eventually as the value of C gradually increases, the prediction error and training error gradually stabilize. The variation curve is shown in Figures 8 and 9. In summary, when the support vector machine is used for parameter selection, the variables are more of an influence on the measurement accuracy, and the values of the kernel parameter \(\gamma\) and the penalty parameter C cannot be too large or too small. The selection of appropriate SVR parameters is crucial for the prediction results of short-duration traffic flow prediction models. After several parameter training as well as corrections, the SVR model in this chapter was finalized with a penalty parameter C of 1.2466 and a kernel parameter \(\gamma\) of 0.8327. To more fully assess the stability and reliability of model performance, 95% confidence intervals were added. These confidence intervals were computed over multiple (10) independent training and testing sessions to reflect the range of error variation under different runs or data configurations. For each parameter combination, we calculated the mean and standard error of the error metrics (e.g., RMSE, MAE) for each experiment. Using the 95% confidence interval formula,  
\[CI=\text{mean}\pm 1.96\times SE \tag{20}\]  
where \(SE=\frac{s}{\sqrt{n}}\), s is the sample standard deviation, and n is the number of experiments, as shown in Figure 10.  
Figure 8: Variation curve of prediction error (C = 0–200, \(\varepsilon=0.01\)). Figure 9: Variation curve of training error (C = 0–200, \(\varepsilon=0.01\)).