Applied Sciences, Vol. 13, Pages 308: Research on Short-Term Traffic Flow Combination Prediction Based on CEEMDAN and Machine Learning

In order to verify the superiority of the short-term traffic flow prediction model based on CEEMDAN and machine learning proposed in this paper, real traffic flow data were used to train the model, and the combined model in this paper was compared with the prediction results of the LSTM model, the IGWO-SVM model, and the KNN model to verify the performance of the combined model and the three single models.

4.2.2. Data PreprocessingThe authors selected a time series of traffic flows for five consecutive days, as shown in Figure 5. It can be seen from the traffic flow time series curve chart that the traffic flow data do not form a gentle curve but fluctuate significantly with time changes. The traffic flow suddenly increased or decreased at some time points, showing strong randomness. At the same time, the trends of the traffic flows were similar over the course of the days, showing the cyclical nature of traffic flows.For the existing traffic flow data, CEEMDAN was used for decomposition, and the white noise of 500 sets of standard deviations of 0.2 was added. The decomposition result is shown in Figure 6. As can be seen in Figure 6, the original traffic flow was decomposed into eight well-performing component sequences, which show the frequency and amplitude changes of the traffic flow sequence. In the figure, from top to bottom, the frequency of the component sequence gradually decreases, and the amplitude gradually decreases. IMF1 has the largest fluctuation and shortest period, and IMF8 has the smallest fluctuation, the longest period, and a certain degree of stationarity.In order to measure the decomposition effect of CEEMDAN, the reconstruction error after the decomposition of traffic flow was calculated. Figure 7 shows the reconstruction error. As can be seen in the figure, the maximum reconstruction error does not exceed 6 × 10−14. The reconstruction error is extremely small and not enough to have an impact on the prediction results and can be ignored.In order to accurately predict the sequence of different traffic flow components, the PE values of each IMF component obtained from the decomposition analysis were calculated. In the calculation of the PE values, the embedded dimension m and the delay time τ  affected the sizes of the PE values. The embedded dimension m was 6 and the delay time τ  was 1. The calculation results for each IMF component are shown in Table 2 and Figure 8.As can be seen in Table 2 and Figure 8, the permutation entropy of IMF 1 is the largest, the permutation entropy of IMF8 is the smallest, and as the component sequence increases, the permutation entropy value gradually decreases, indicating that the randomness and complexity of the time series component sequence gradually decrease. The permutation entropy values of IMF1, IMF2, IMF3, and IMF4 are between 0.5 and 1.0, indicating that these four component sequences have strong randomness and complexity, and they are regarded as high-frequency component sequences. The permutation entropy values of IMF5, IMF6, and IMF7 are between 0.3 and 0.5, indicating that the randomness and complexity of these three components are not high, and they are regarded as intermediate-frequency components. The permutation entropy value of IMF8 is between 0 and 0.1, indicating that the randomness and complexity of the component sequence are weak, and it is listed as a low-frequency component. The classification of the component sequences provided a basis for the construction of the subsequent combined models. 4.2.3. Outcome Evaluation Indicators

The establishment of the outcome evaluation indicators is an indispensable part of traffic flow forecasting, and its significance is as follows:

(1) When the traffic flow of a certain section of the road is predicted, the overall advantages and disadvantages of the prediction results can be directly reflected, and the purpose of verifying the validity of the model is achieved;

(2) When we use different models to predict traffic flow, we can also visually compare the prediction effects of different models through evaluation indicators so as to quickly judge the advantages and disadvantages of the prediction models.

In this study, the short-term traffic flow prediction model was evaluated by the mean squared error (MSE), the mean absolute error (MAE), the root mean square error (RMSE), and the decision coefficient (R2) [25]. The calculation formula is as follows:

EMSE=1N∑i=1N(yi−yi∧)2

(13)

EMAE=1N∑i=1Nyi−yi∧

(14)

ERMSE=1N∑i=1N(yi−yi∧)2

(15)

R2=1−1N∑i=1N(yi−yi∧)21N∑i=1N(yi¯−yi)2

(16)

In the above equation,  EMSE is the mean square error, EMAE is the mean absolute error, ERMSE  is the root mean square error, R2 is the decision coefficient, N is the total predicted time length, and yi, y∧i , and  yi¯ are, respectively the measured value, predicted value, and the average value of traffic flow. The smaller the values of EMSE, EMAE, and ERMSE, and the smaller the deviation between the predicted results and the actual traffic data, the better the model performance. R2 is the correlation between the prediction results and the actual results, and its value is between 0 and 1. The closer it is to 1, the better the fitting regression effect is and the better the model is. Therefore, the optimal prediction model should simultaneously meet the two conditions of the minimum error and the maximum decision coefficient.

4.2.4. Comparative Analysis of ResultsDue to the strong nonlinear mapping ability of the long short-term memory neural network and the strong randomness and volatility of the four high-frequency component sequences of IMF1, IMF2, IMF3, and IMF4, the BGWO-LSTM model was selected for prediction in this study. The initial population number was set to 30, the maximum number of iterations was 100, the lb value was 3~20, the step size was 1, the ls value was 5~50, and the step size was 5. The ep value was 50 to 300, the step size was 10, the dp value was 0.3 to 0.61, and the step size was 0.01. The high-frequency component prediction is shown in Figure 9.In Figure 9, it can be seen that IMF1 had the highest frequency, the strongest volatility, the greatest difficulty in forecasting, and the largest error in prediction. As the component sequence grew, the degree of fluctuation of the data decreased, the error of prediction was gradually reduced, and IMF4 achieved a good fitting effect.Due to the good nonlinear mapping ability of support vector machine, the three intermediate-frequency component sequences, IMF5, IMF6, and IMF7 were characterized by certain randomness and volatility. The IGWO-SVM model was selected for prediction. The initial population number was set to 30, and the maximum number of iterations was set 100. The intermediate-frequency component prediction is shown in Figure 10.In Figure 10, it can be seen that the intermediate-frequency components had a certain degree of volatility, and the prediction difficulty was less than that of the high-frequency component sequence. Among the three intermediate-frequency components, the IMF5 prediction was the most difficult, and the error of the prediction was relatively large. With the growth in the component series, the degree of data fluctuation was reduced, the prediction error was also gradually reduced, and the prediction error of IMF7 was the smallest.Due to the convenient modeling of the KNN, the number of calculations was low, the model training time was greatly reduced compared to BGWO-LSTM and IGWO-SVM, and it also had good prediction performance for relatively stable data, so the KNN model was selected to predict a relatively stable component sequence IMF8. The low-frequency component prediction is shown in Figure 11. As can be seen in Figure 11, the KNN model had a good predictive result for IMF8.It can be seen in Figure 9, Figure 10 and Figure 11 that different models were selected to predict different component sequences, and the prediction results are quite ideal. Then, the prediction results of each component sequence were superimposed to obtain the output results of the final combined model and the output results were comprehensively compared with the single models (BGWO-LSTM, IGWO-SVM, and KNN) to evaluate the advantages and disadvantages of the combined model and the single prediction model proposed in this paper. The final results of each traffic flow prediction model are shown in Figure 12, where the horizontal axis represents the time series points and the vertical axis represents the traffic flow through this section of the road in 5 min.In Figure 12, it can be seen that these four prediction models could predict the overall trend of traffic flow in a day for the time periods when the traffic flow was relatively stable and the changes were not large, such as in the timeline of [0, 50]. The prediction results of the four prediction models are relatively close to the actual value, but the prediction results are very different in the time periods of some traffic flow mutations. The traffic flow gradually reached the maximum value on one day at the time axis of [150, 200], and the traffic flow fluctuated significantly, which brought great difficulties to the flow prediction in this time period. In order to more intuitively see the prediction effects of different models, this local prediction result was separately amplified and analyzed. The local prediction results are shown in Figure 13.In Figure 13, it can be seen that the combined prediction model of traffic flow based on CEEMDAN and machine learning proposed in this paper (hereafter referred to as the combined model) has the best prediction results, followed by the BGWO-LSTM and IGWO-SVM models, and KNN has the worst prediction accuracy. Especially in the time period [185, 195] of the timeline, the traffic reached the maximum, and the prediction results of the three single prediction models were quite different from the actual traffic flow. The arrival of the peak of the traffic flow was not well predicted, while the prediction results of the combined model were relatively close to reality and successfully predicted the peak of traffic.In order to more intuitively compare the advantages and disadvantages of the above four models, the four index models of the mean squared error (MSE), the mean absolute error (MAE), the root mean square error (RMSE) and the decision coefficient (R2) were used for comprehensive analysis and evaluation, and the evaluation indicators of each model are shown in Table 3.As can be seen in Table 3, the mean squared error of the combined model is smaller than that of the BGWO-LSTM model, the IGWO-SVM model, and the KNN model 41.26, 44.98 and 57.69, respectively. The mean absolute error of the combined model is smaller than that of the BGWO-LSTM model, the IGWO-SVM model, and the KNN model, by 2.33, 2.44, and 2.70, respectively. The root mean square error of the combinatorial model is smaller than that of the BGWO-LSTM model, the IGWO-SVM model, and the KNN model by 2.89, 3.11, and 3.80, respectively. The three error indicators of the combined model are much smaller than the remaining single models. At the same time, the coefficient of determination of the combined model is closer to 1 than that of the other models, indicating that the prediction result of the combined model was closest to the actual traffic flow. Of the remaining three single models, the BGWO-LSTM model performed the best, the IGWO-SVM model followed, and the KNN model performed the worst.

In summary, the combined model proposed in this paper combines the advantages of a single prediction model, and the prediction accuracy is greatly improved compared to that of a single model. It can accurately predict road traffic flow and has good application prospects.

留言 (0)

沒有登入
gif