| The occurrence of traffic accidents has the characteristics of time and space,and has certain uncertainty and randomness,which makes it difficult to predict the number of road traffic accidents.However,the seasonal periodicity and tendency of traffic accidents make it possible to be predicted.The number of road traffic accidents has the characteristics of time series,so it is necessary to use the time series model to extract the intrinsic characteristics of the data for prediction.According to the collected traffic accident data of a city from 2011 to2015,a road traffic accident number prediction model based on Bi-LSTM is proposed to predict the number of accidents,and the prediction effect is compared with the time series model based on LSTM,ARMA,and SARIMA.The main contents of this paper are as follows:(1)Time-series processing of road traffic accident data with multiple time granularity.The collected traffic accident data is counted according to three different time granularities: month,half month,and week.After that,the data is processed in time series and a training set that can be supervised learning and a test set that can be predicted and verified are constructed.(2)A prediction model of road traffic accidents based on Bi-LSTM is proposed.In order to improve the speed and accuracy of Bi-LSTM processing,the input data is firstly processed for dispersion standardization;secondly,the activation function of the network and the optimizer algorithm are trained using the training set,and selection is made according to the training result;then based on the training set Perform supervised training on Bi-LSTM model parameters;finally,perform inverse dispersion standardization on the output data.In this way,a road traffic accident number prediction model based on Bi-LSTM is constructed,and the prediction verification is performed on the data in the test set.(3)A variety of accident number prediction models based on LSTM,ARMA,and SARIMA were established,and compared with the Bi-LSTM model.Existing accident data has been tested and found to have the characteristics of stationarity,seasonality,and nonlinearity.Based on these characteristics,the ARMA,SARIMA and LSTM prediction models are established respectively,and the prediction errors of these four models are measured by RMSE and MAE indicators.Evaluation and comparison.The accuracy of the prediction results of the four models can be obtained through the evaluation of error indicators: The prediction result error of the road traffic accident number prediction model based on Bi-LSTM under the three time granularities of month,half month and week,whether it is the RMSE value or the MAE value The smallest(except for the MAE value when the monthly time granularity is used for forecasting),and the finer the time granularity,the smaller the prediction error of the model.Therefore,for the prediction of the number of road traffic accidents in this experiment,a better prediction can be achieved by using the prediction model of the number of road traffic accidents based on Bi-LSTM. |