0% found this document useful (0 votes)
0 views

Paper_SLIMANI_INTIS'19

This document presents a comparative analysis of traffic prediction models, specifically focusing on SARIMA and artificial neural networks, using real-world data from Morocco. The study finds that neural networks outperform SARIMA in terms of prediction accuracy, with an absolute relative error of 0.57% compared to 7.27% for SARIMA. The paper details the methodology, data collection, model implementation, and performance evaluation criteria used in the analysis.

Uploaded by

Nadia Slimani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Paper_SLIMANI_INTIS'19

This document presents a comparative analysis of traffic prediction models, specifically focusing on SARIMA and artificial neural networks, using real-world data from Morocco. The study finds that neural networks outperform SARIMA in terms of prediction accuracy, with an absolute relative error of 0.57% compared to 7.27% for SARIMA. The paper details the methodology, data collection, model implementation, and performance evaluation criteria used in the analysis.

Uploaded by

Nadia Slimani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Comparative analysis of traffic prediction models

based on a real case study


Nadia SLIMANI Ilham SLIMANI
Mohammadia School of Engineering Faculty of Science, Mohammed I University
Avenue Ibn Sina, Agdal, B.P 765, Avenue Mohammed VI B.P. 524,
10100, Rabat, Morocco 60000 Oujda, Morocco
+212 661456185 +212 661599572
[email protected] [email protected]

Mustapha AMGHAR Nawal SBITI


Mohammadia School of Engineering Mohammadia School of Engineering
Avenue Ibn Sina, Agdal, B.P 765, Avenue Ibn Sina, Agdal, B.P 765,
10100, Rabat, Morocco 10100, Rabat, Morocco
+212 661210120 +212 661296910
[email protected] [email protected]

ABSTRACT and non-parametric techniques or even comparing the


effectiveness of those forecasts models.
Traffic forecasting is a highly debated subject from several The literature proposes very different approaches to deal with this
perspectives. Indeed, in the context of smart cities and with subject, and the accuracy of short-term traffic predictions is a key
the uninterrupted increase of the number of vehicles, road factor for the success of road infrastructure management. Indeed,
congestion is taking up an important place in research.. This this research proposes a comparative analysis of daily traffic flow
work is part of this perspective and attempts to solve this in a road segment using two prediction methods: SARIMA
practical problem. Our resolution method aims to predict Seasonal autoregressive integrated moving average as a classic
daily traffic flow using two different forecasting techniques parametric model and the predictive performance of artificial
including SARIMA and artificial neural networks in order to neural networks as a non-parametric model, studied in a previous
evaluate the effectiveness of each model by comparing the work [1]. The proposed study is based on real-world dataset
prediction results using a real-world dataset recorded on a provided by a recognized infrastructure manager in Morocco.
road section and provided by a recognized infrastructure
manager in Morocco. Therefore, based on specific The present paper is organized as follows:
performance criteria, this comparative analysis shows clearly The first section is dedicated to the literature review including
that forecasts based on neural networks, the non-parametric problem description and an overview of different methods used to
model (with an absolute relative error of 0.57%), outperforms solve the problematic of traffic jam forecasting. The second part is
those based on the parametric model SARIMA (with an devoted to the presentation of the proposed resolution
absolute relative error of 7.27%). methodology by describing in details the dataset and the model
implementation. Then, in the last part of this paper, numerical
Keywords experimentations are presented, with the obtained results and the
Traffic forecasting, artificial neural network, mathematical analysis of the best prediction technique based on different
models, ARIMA, SARIMA. performance criteria along with the perspectives and the
concluding remarks.
1. INTRODUCTION

With the introduction of new information technologies in the 2. LITTERATURE REVIEW


transportation field, also called Intelligent Transportation Systems
(ITS), and specifically with the appearance of connected and
smart cities concept, it is essential to have a rational traffic flow 2.1 Problem description
prediction for an optimal traffic management. In the context of smart cities and with the uninterrupted increase
During the last three decades, this issue was studied by several of the number of vehicles, road congestion is taking up an
authors and under several perspectives such as focusing on important place in research.
methodologies to improve forecasts accuracy or studying the As the result of limitations in transportation networks, road
performance of each prediction model including the parametric congestion is categorized into two types: recurrent with a certain
periodicity or stochastic and caused by external parameters such as a solution to different problems in various contexts such as
as car accident, road constructions, weather, holidays… modelling and simulation, optimization, classification or
As an attempt to solve this practical problem, the present paper prediction [5] .
aims to predict daily traffic flow using two different forecasting In order to capture nonlinearities in the data, ANNs use the back-
techniques including SARIMA and artificial neural using a real- propagation (BP) learning algorithm (see fig.1). This algorithm is
life dataset recorded on a highway section in Morocco. divided into two main phases the forward phase and the backward
phase that should be repeated until the output results are
2.2 An overview of the most used methods for satisfactory:
traffic prediction The forward propagation phase where, after passing through the
activation function, the neurons in the input layer receive a signal,
Based on time series and mathematical modeling, the first traffic pass the weighted inputs to neurons in the hidden layer and then
forecasting was made in 1970s. Since then, researchers develop a the neurons of the output layer.
variety of techniques to study and predict traffic flow categorized The backward propagation phase where as indicated by its name,
into two families: the network error is propagated from the output layer to the input
- Parametric methods based on mathematical tools and layer in order to adjust the connections weights so the final output
statistical analysis using historical data such as linear can reach the specified error level.
and nonlinear regression, autoregressive integrated
moving average. Nevertheless, those methods are Fig. 1. Architecture of Back-propagation Multi-Layer neural
complicated to use.
- Nonparametric methods with the ability of learning and
approaching any nonlinear function. Those techniques
are mostly based on the use of artificial intelligence like
neural networks that offer flexible parameters during the
learning and implementation phases.

ARIMA and SARIMA models


The most commonly used approach for forecasting in time series
model is ARIMA (Autoregressive Integrated Moving Average).
This model is suitable for linear predictions and is based on
estimating parameters in the past then using those estimated
values in order to predict future time series values.
The term ARIMA models includes many variants to treat specific
cases. In the model ARIMA(p,d,q), the parameter p denotes the
order of the auto-regressive part, the parameter q the order of the
moving average part, and d the number of differentiation steps.
Many researchers such as Wang and Liu [2] that apply ARIMA to
predict traffic flow conditions or Lee and Fambro [3] that apply it
to predict freeway traffic flow; demonstrate that ARIMA models network
have better performance in short-term forecasting than the other
time series models.
To quote some works using neural networks for traffic forecasting
ARIMA model can be used on only stationary and uninterrupted purposes:
series of data. This method can handle data with a trend or
seasonality; however, it does not support time series with a Rong et al. [6] also compare the performance of three different
seasonal component. forecasting techniques using real data in Beijing, including
ARIMA, neutral network, and nonparametric regression. The
An extension to ARIMA that supports the direct modeling of the results indicate that nonparametric regression considerably
seasonal component of the series is called SARIMA (Seasonal outperforms the other studied models. Besides, the solution takes
Autoregressive Integrated Moving Average). the computational efficiency into account as well as the prediction
Williams et al. [4] propose SARIMA model to forecast urban performance [7].
freeway traffic flow. Huang et al. [8] and Loumiotis et al. [9] propose a forecasting
Artificial Neural Network model system based on intelligent agents to predict road traffic. In [9],
the artificial neural networks are used to estimate the vehicles’
Artificial Neural Networks (ANN) are inspired from the speed on the road as an indicator of the traffic congestion. The
functioning of the human brain. There are several types of results indicate that the proposed system provides high accuracy
neurons, and they all have three functional properties: (1) with a mean absolute percentage error of about 6.2%.
Receiving a signal from other neurons (2) employing those signals
with the aim of producing information (3) communicating Xu et al. [10] [11] and Zeng et al. [12] develop a hybrid-
information to other neurons as an output. predicting model. In [12], the approach combines both ARIMA
and Multilayer Artificial Neural Network to forecast short-term
ANNs have the ability to learn patterns from historical data; it is traffic flow where authors propose an algorithm to model short-
suitable for nonlinear predictions. Thus, based on that learning term traffic flow time series and estimate the weights of the Multi-
capacity, the artificial intelligence of neural networks can be used
Layer neural network as well as the ARIMA model parameters. This transformation will make it possible to detect seasonal traffic
The numerical experimentation indicates that the hybrid model trends.
improves forecasting accuracy better than results obtained by
either of the models used separately. Fig. 3. Evolution of hourly traffic by weekday from station
S140 in 2017

6000
3. PROPOSED METHODOLOGY
5000
The aim of this work is to make traffic volume forecasts using 4000
two approaches: the first parametric approach using the ARIMA 3000
model and the second non-parametric approach using artificial 2000
neural networks that were the subject of our previous work [1]. 1000
Then, a comparison of the results obtained will be made on the
0
basis of previously defined criteria.

3.1 Data description


The data used to evaluate the performance of the proposed model Monday
was collected from a heavily used toll station in Morocco’s Tuesday
highway. The station S140 is located between two economic and
Wednesday
political poles of Morocco. Therefore, it was selected as the test
station for the traffic flow prediction. Thursday
Friday
Fig. 2. The toll station location used in experiment
Saturday
Sunday

Thus, the dataset contains 30792 data points in total


corresponding to hourly traffic. This database has been aggregated
into months offering 42 monthly traffic data. The data were
divided into two data sets: training and testing set. The training set
is formulated using traffic daily data of the first three years
including 2015, 2016 and 2017. The test set is formulated with
traffic daily data of the first six months of 2018.

3.2 Choice of the model


Through literature, no model is a universal model that is suitable
for all circumstances [13]. Using ARIMA model to solve complex
nonlinear problems may not be suitable, besides, neural network
has led to perfectible results in case of insufficiently designed
inputs [14].
This study will be an opportunity to first experiment the ARIMA
The dataset contains traffic flow information recorded within each model which is widely used by researchers, and then compare its
hour during years 2015, 2016, 2017 and 2018 and segmented by results with those obtained using artificial neural networks.
classification of the type of vehicle (lightweight vehicle: class 1, 3.3 Performance criteria
truck: class 2, vehicle with three or more axles: class 3...). A In order to analyze the performance of each traffic forecasting
sample of a recorded file is presented in Table 1. method, an index of performance [15] is used to evaluate each
model, it consists of five components:
(a) Ease of model implementation;
Table 1. Hourly traffic classification (b) Absolute error;
Day Hour Class Class Class Total (c) Relative error;
1 2 3 traffic (d) Standard error;
(e) Root Mean Square Error (RMSE).
06/04/2015 09:00 1367 128 71 1566
25/08/2016 17:00 1342 149 25 1516 The ease of model implementation is difficult to accurately
assess, because it refers to the effort required to learn how to use
30/12/2017 16:00 1981 185 132 2298 the software. This includes ease of understanding, learning and
08/06/2018 01:00 389 116 97 602 operating. This component of the performance index is evaluated
based on experience gained in developing the models.

In order to mitigate the impact of outliers in the hourly traffic flow The absolute error component of the index serves as the primary
data (see Fig.3) these data were aggregated at monthly intervals. measure of model accuracy. The measure simply describes how
far one would expect a predicted volume of traffic to deviate from 4.2 Modeling process of SARIMA model
(either above or below) the real traffic recorded. The main steps of establishing the seasonal ARIMA model are
[20]:
The relative error this measurement takes into account the
difference between the predicted and the real value, divided by the (a) Determine the period length.
real value. If it is positive, it is because the predicted value is (b) Identify the stationarity of the time series that is to determine d
higher than the exact value (we speak of an error by excess), and and D, the common identifying tool is autocorrelogram.
if it is negative, it is because it is lower (default error). If the autocorrelation function tends to zero quickly, then we can
say that the time series is stationary time series. If the time series
The standard error or Error’s distribution it measures the has some tendency, then difference to the time series is needed. If
dispersion of the predicted values from the traffic recorded. It is the time series has seasonal law, then seasonal difference to the
defined as the square root of the variance or, equivalently, as the time series is needed. If the time series has heteroscedasticity,
root mean square of the deviations from the mean. then logarithmic transformation to the time series is needed.
(c) Identify the model and determine the order of the ARIMA
Root Mean Square Error (RMSE) is the most frequently used model p , q , P and Q . In general, we can estimate the value of p,
metrics of prediction performance in previous work [16]. It is the q, P and Q by observing autocorrelogram and partial
square root of the MSE (Mean Square Error) index. MSE is autocorrelogram.
defined as the arithmetic mean of the squares of the differences (d) Obtain the estimated value of the all parameters of the model
between model forecasts and observations. by maximum likelihood estimation.
(e) Forecast.
In this paper, the modeling process is realized by the software
4. EXPERIMENTS AND RESULTS Excel by downloading the function NUMXL.

4.1 Model implementation 4.3 Prediction results


In this section, the proposed model was implemented to predict The main contribution of the present work is the realization of a
traffic flow with different state vectors. The SARIMA model forecasting system based on ARIMA in order to predict monthly
(ARIMA model with seasonal property) was developed using traffic flow. Furthermore, the paper uses the data of 3 years to
forecast package in Excel, which is a software environment in forecast the monthly vehicle flow of the first six months of the
Microsoft, by downloading the free Excel add-in function year 2018.
NUMXL for statistical computing, econometrics and data analysis
In this study, various SARIMA models are tested for traffic flow
[17].
The first step is to determine the stationarity of the input data prediction, then compared with the results found in our previous
series via the autocorrelation function (ACF). In our study, the work [1] by using MLP architecture with neural network.
time series of traffic flow is not stationary. ARIMA models The Table 2 shows the recorded traffic volume data for the period
require the input data to have a constant mean, variance, and of 36 months from January 2015 to December 2017, compared
autocorrelation through time [18]. Therefore, the input data series with forecasted traffic using SARIMA (1,0,1) (1,0,1) period 12
were transformed into a stationary model through a differencing model and Neural Network (ANN) with a Multi-Layer Perceptron
process [19]. The number of non-seasonal differences (d) was set structure of three hidden layers. The first hidden layer is
to 1 to ensure the stationarity of the data. Following this, composed of five neurons, the second contains eight neurons and
parameter estimation in the ARIMA models was performed, and the third one is composed of two neurons. In addition, the transfer
then traffic flow was forecasted using the SARIMA models. function is Sigmoid and Backpropagation as learning algorithm
SARIMA model were first trained using the data in the training with the existence of the Bias neuron, for more details about this
set (From January 2015 to December 2017), and then tested using study please refer to [1].
the testing set (From January 2018 to June 2018). Several models
was tested, and the best forecasting performance was SARIMA
(1,0,1) (1,0,1)12.
Fig. 4. Highway traffic volume for 36 months

1200000
1000000
800000
600000
400000 Traffic
200000
0
1 2 3 4 5 6 7 8 9 1011 12 1 2 3 4 5 6 7 8 9 10 1112 1 2 3 4 5 6 7 8 9 1011 12
2015 2016 2017
Table 2. Prediction results using SARIMA and ANN Table 3. Comparison of performance criteria
Month Recorded Forecasted Forecasted Performance SARIMA ANN Model
traffic traffic using traffic using criterion
Model
SARIMA ANN*
Ease of model Difficult Medium
Jan-18 855.016 754.851 843.918
implementation
Feb-18 773.178 740.389 770.904 See Table 4 See Table 4
Absolute error
Mar-18 838.361 747.625 833.108 7,27% 0,57%
Relative error
Apr-18 934.568 784.813 934.573
Standard error 126.018 11.515
May-18 835.100 826.381 837.943 RMSE 51.446 4.701
Jun-18 827.913 841.929 815.076
*Based on the sum of forecasted daily traffic by ANN. Table 4. Comparison of absolute error using
SARIMA and ANN
A graphical illustration with a comparison between the actual Month SARIMA ANN
Absolute Absolute
traffic and the predicted traffic flow is presented in the next figure
error error
(see Fig.3).
Jan-18 100.165 11.098
Fig. 5. Recorded traffic vs traffic forecasting results Feb-18 32.789 2.274
Mar-18 90.736 5.253

1.000.000 Apr-18 149.755 5


May-18 8.719 2.843
800.000
Jun-18 14.016 12.837
600.000
TOTAL 368.148 28.614
400.000

200.000

0 5. CONCLUSION AND PERSPECTIVES


Jan-18 Feb-18 Mar-18 Apr-18 May-18 Jun-18

Recorded traffic This paper presents a review of several works related to the
modelling traffic flow prediction that is a key component of traffic
Forecasted traffic using SARIMA model
control.
Forecasted traffic using ANN
In this study, we propose to experiment and compare two different
methods of forecasting traffic flow with a horizon of six months
4.4 Discussion of results SARIMA and ANN. Results clearly indicate that ANN model was
In our case and from the results obtained for the test series, it’s able to predict vehicle count accurately even if some exogenous
concluded that the artificial neural network and SARIMA provide factors weren’t included as inputs (weather conditions, incidents,
forecasting values with an absolute error less than 10%. It can be road works...). Therefore it is concluded that ANN can be applied
used to produce traffic forecasts with a better accuracy. for traffic flow prediction with mixed traffic conditions for
The comparison of the observed and modelled traffic flows in Moroccan highways for the toll station we studied.
Tables 3 and 4 shows the forecasts were made with less than ± The accuracy of forecasted traffic flow is calculated comparing
5.0% error. It can be seen that SARIMA model slightly under- with a real dataset recorded on a road section and provided by a
forecast during high traffic volume periods. A closer look at the recognized infrastructure manager in Morocco. The results show
significantly different forecasts by ANN indicated that the that the accuracy of ANN best topology for this case study is a
apparent deficiency in the forecasts was due to the inconsistent Multi-Layer Perceptron networks composed by three hidden
exogenous inputs [1] that can influence traffic (weather layers (5-8-2) with an absolute relative error 0, 57%.
conditions, incidents, road works...).
A future research direction consists in coupling the forecasting
performance of the artificial neural networks to other prediction
models as Kalman filter [21], ARIMAX…
6. ACKNOWLEDGMENTS in 2008 Workshop on Power Electronics and Intelligent
Transportation System, Guangzhou, China, 2008, p.
We are grateful to each person that contributes to conduct this
621‑625.
study. [13] B. L. Smith, B. M. Williams, et R. Keith Oswald,
« Comparison of parametric and nonparametric models for
traffic flow forecasting », Transp. Res. Part C Emerg.
7. REFERENCES Technol., vol. 10, no 4, p. 303‑321, août 2002.
[14] B. L. Smith et M. J. Demetsky, « Traffic Flow Forecasting:
Comparison of Modeling Approaches », J. Transp. Eng.,
[1] N. Slimani, I. Slimani, N. Sbiti, et M. Amghar, « Traffic
vol. 123, no 4, p. 261‑266, juill. 1997.
forecasting in Morocco using artificial neural networks »,
[15] B. L. Smith et M. J. Demetsky, « Short-term traffic flow
Procedia Comput. Sci., vol. 151, p. 471‑476, 2019.
prediction models-a comparison of neural network and
[2] J. Wang et Y. Liu, « Mean Velocity Prediction Information
nonparametric regression approaches », in Proceedings of
Feedback Strategy in Two-Route Systems under ATIS »,
IEEE International Conference on Systems, Man and
Adv. Mech. Eng., vol. 7, no 2, p. 640416, févr. 2015.
Cybernetics, San Antonio, TX, USA, 1994, vol. 2, p.
[3] S. Lee et D. B. Fambro, « Application of Subset
1706‑1709.
Autoregressive Integrated Moving Average Model for Short-
[16] X. Luo, L. Niu, et S. Zhang, « An Algorithm for Traffic
Term Freeway Traffic Volume Forecasting », Transp. Res.
Flow Prediction Based on Improved SARIMA and GA »,
Rec. J. Transp. Res. Board, vol. 1678, no 1, p. 179‑188, janv.
KSCE J. Civ. Eng., vol. 22, no 10, p. 4107‑4115, oct. 2018.
1999.
[17] J. Adamowski, H. Fung Chan, S. O. Prasher, B. Ozga-
[4] B. M. Williams, P. K. Durvasula, et D. E. Brown, « Urban
Zielinski, et A. Sliusarieva, « Comparison of multiple linear
Freeway Traffic Flow Prediction: Application of Seasonal
and nonlinear regression, autoregressive integrated moving
Autoregressive Integrated Moving Average and Exponential
average, artificial neural network, and wavelet artificial
Smoothing Models », Transp. Res. Rec. J. Transp. Res.
neural network methods for urban water demand forecasting
Board, vol. 1644, no 1, p. 132‑141, janv. 1998.
in Montreal, Canada: WATER DEMAND FORECASTING
[5] I. Slimani, I. E. Farissi, et S. Achchab, « Coordination by
USING WAVELET-NEURAL NETWORKS », Water
sharing demand forecasts in a supply chain using game
Resour. Res., vol. 48, no 1, janv. 2012.
theoretic approach », in 2016 4th IEEE International
[18] G. Box, « Box and Jenkins: Time Series Analysis,
Colloquium on Information Science and Technology (CiSt),
Forecasting and Control », in A Very British Affair, London:
2016, p. 122‑127.
Palgrave Macmillan UK, 2013, p. 161‑215.
[6] Y. Rong, X. Zhang, X. Feng, T. Ho, W. Wei, et D. Xu,
[19] M. S. Ahmed et A. R. Cook, « Analysis of Freeway Traffic
« Comparative analysis for traffic flow forecasting models
Time-Series Data by Using Box-Jenkins Techniques », p. 9.
with real-life data in Beijing », Adv. Mech. Eng., vol. 7, no
[20] M. Tong et H. Xue, « Highway Traffic Volume Forecasting
12, p. 168781401562032, déc. 2015.
Based on Seasonal ARIMA Model », J. Highw. Transp. Res.
[7] Y. Bai, X. Jin, X. Wang, T. Su, J. Kong, et Y. Lu,
Dev. Engl. Ed., vol. 3, no 2, p. 109‑112, déc. 2008.
« Compound Autoregressive Network for Prediction of
[21] A. Emami, M. Sarvi, et S. Asadi Bagloee, « Using Kalman
Multivariate Time Series », Complexity, vol. 2019, p. 1‑11,
filter algorithm for short-term traffic flow prediction in a
sept. 2019.
connected vehicle environment », J. Mod. Transp., vol. 27,
[8] Y. Huang, L. Qian, A. Feng, N. Yu, et Y. Wu, « Short-Term
no 3, p. 222‑232, sept. 2019.
Traffic Prediction by Two-Level Data Driven Model in 5G-
Enabled Edge Computing Networks », IEEE Access, vol. 7,
p. 123981‑123991, 2019.
[9] I. Loumiotis, K. Demestichas, E. Adamopoulou, P.
Kosmides, V. Asthenopoulos, et E. Sykas, « Road Traffic
Prediction Using Artificial Neural Networks », in 2018
South-Eastern European Design Automation, Computer
Engineering, Computer Networks and Society Media
Conference (SEEDA_CECNSM), Kastoria, 2018, p. 1‑5.
[10] D. Xu, Y. Wang, L. Jia, Y. Qin, et H. Dong, « Real-time
road traffic state prediction based on ARIMA and Kalman
filter », Front. Inf. Technol. Electron. Eng., vol. 18, no 2, p.
287‑302, févr. 2017.
[11] D. Xu, H. Dai, Y. Wang, P. Peng, Q. Xuan, et H. Guo,
« Road traffic state prediction based on a graph embedding
recurrent neural network under the SCATS », Chaos
Interdiscip. J. Nonlinear Sci., vol. 29, no 10, p. 103125, oct.
2019.
[12] D. Zeng, J. Xu, J. Gu, L. Liu, et G. Xu, « Short Term Traffic
Flow Prediction Using Hybrid ARIMA and ANN Models »,

You might also like