Journal of Advanced Transportation

Volume 2019, Article ID 5314520, 10 pages

https://doi.org/10.1155/2019/5314520

## Bayesian Dynamic Linear Model with Adaptive Parameter Estimation for Short-Term Travel Speed Prediction

Correspondence should be addressed to Tai-Yu Ma; ul.resil@am.uy-iat

Received 27 November 2018; Accepted 5 March 2019; Published 23 June 2019

Academic Editor: Emanuele Crisostomi

Copyright © 2019 Tai-Yu Ma and Yoann Pigné. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

Bayesian dynamic linear model is a promising method for time series data analysis and short-term forecasting. One research issue concerns how the predictive model adapts to changes in the system, especially when shocks impact system behavior. In this study, we propose an adaptive dynamic linear model to adaptively update model parameters for online system state prediction. The proposed method is an automatic approach based on the feedback of prediction errors at each time slot without the needs of external intervention. The experimental study on short-term travel speed prediction shows that the proposed method can significantly reduce the prediction errors of the traditional dynamic linear model and outperform two state-of-the-art methods in the case of major system behavior changes.

#### 1. Introduction

Accurate short-term traffic prediction plays an important role for successful traffic information system application such as en-route navigation system, traffic control, and traffic congestion management [1]. During past decades, different prediction methods have been proposed to predict traffic states for developing effective traveler information system and real-time traffic management. The methodology for short-term travel time/traffic flow prediction can be classified into the data-driven approach and model-driven approach [2–5]. The model-driven approach consists in applying traffic flow theory to inference traffic state dynamics based on partial observation of traffic data [6–10]. The advantage of the model-driven approach is that it can obtain accurate traffic state estimation with fewer observations. However, the performance of the model-driven approach can be poor if the applied models are not well calibrated [4]. As regards the data-driven approach, it relies on the spatial-temporal correlation of traffic states for which future traffic states can be estimated based on historical time series data. Among different data-driven approaches, which are the focus of this study, machine learning methods are widely used for traffic characteristics prediction, e.g., neural networks [11, 12], autoregressive integrated moving average models (ARIMA) [13, 14], support vector machine methods [15], nearest neighbor classification methods [16, 17], ensemble learning approach [12], and Bayesian dynamic linear models (DLM)/state space models [18–22], among many others. One of the main issues in short-term traffic prediction is how to dynamically adapt a predicting model to the uncertainty of system behavior changes, in particular in case of accident or unforeseen events. With recent vehicular communication advances in real-time traffic data collection, the development of adaptive short-term traffic prediction methods become an active research area in transportation science and in developing applications based on vehicular communication technology.

In this perspective, the DLM approach provides a systematic approach based on Bayes’ theorem for system states updating and prediction. This approach considers system states of interest as unknown stochastic variables to be estimated. The prior distribution of system states is quantified based on historical data. By collecting new data over time, the posterior distribution of system states can be estimated based on the Bayes’ theorem. This sequential learning framework provides an adaptive learning process for handling time series data prediction. It has been shown that model parameters need to be adaptive with system behavior [23]. Fei et al. [19] proposed a DLM for real-time short-term freeway travel time prediction. The model adjusts the variances of disturbance under a user-defined threshold based on the adaptive control theory. However, such an adjustment mechanism is not optimized and relies on the intervention of expert knowledge, raising issues in its generalization in different areas. For this issue, Fei et al. [18] incorporated a Markov switching process in the DLM based on the three-phase traffic flow theory. They showed the Markov switching DLM approach outperforms the ARIMA method.

Another adaptive modeling approach consists in developing methodology to detect change points of system states and update system parameters to catch system behavior changes [24–29]. The change-point detection methods can be designed to monitor prediction errors and detect accidents, providing feedback to adjust model prediction and reduce prediction errors. Comert and Bezuglov [25] applied the hidden Markov model (HMM) and the expectation-maximization (EM) algorithm as a change-point detection method to update the estimation of parameters (i.e., process mean) used in the autoregressive integrated moving average (ARIMA) model. Moreira-Matias and Alesiani [28] proposed a change detection method based on Page-Hinkley change-point detection method [30] for triggering an accident alarm. The threshold for alarm triggering is a user-defined deterministic parameter, corresponding to a tolerable false alarm rate.

In this study, a new online adaptive parameter estimation approach is proposed under the DLM framework to achieve better accuracy of prediction when some external events or system regime changes occur. This method is based on continuously monitoring prediction errors for adaptively adjusting model parameters. The main contribution resides on the adaptive model parameter adjustment design to improve classical DLM approach when unpredicted system behavior changes are detected. The performance of the proposed approach is tested on a simulated road network under accidental scenarios. The performance of the proposed method is compared with classical DLM methods and the benchmark methods, i.e., ARIMA method [31] and Holt-Winters Exponential Smoothing method [32]. Note that we do not intend to extensively compare the proposed approach with other methods, but instead to demonstrate the effectiveness of the proposed method in improving the parameter setting issues of classical DLM approaches.

The rest of the paper is organized as follows. In Section 2, we present the general DLM forecasting framework and different DLM specifications for time series data analysis. In Section 3, a new adaptive parameter estimation method is proposed for online parameter learning to reduce prediction error. Section 4 reports the numerical study on real-time short-term road travel speed prediction under accidental scenarios. A comparative study with two other state-of-the-art methods is provided. Finally, conclusions are drawn and future extensions are discussed.

#### 2. Bayesian Dynamic Linear Model for Traffic State Prediction

A general DLM can be described by an observation equation and a system state equation to model the process of a system [23]. The state equation describes system state evolution mapping from a priori distribution at t-1 to posterior distribution at time t. The observation equation describes observed measurements at time t in relation to system states. The evolution of system states over time is assumed to follow a stochastic process with Gaussian errors. A DLM can be written as [23] In (1), is the system state at time* t*. is the evolution matrix of . In (2), is observation at time . is the design matrix of . and are white noise error terms following normal distribution with 0 mean and variance and , respectively. It is assumed that and are mutually independent, i.e., for . The ratio is called the* signal-to-noise ratio* at time . It represents the ratio of system prediction errors and observation errors . In general, and are unknown and need to be estimated from data. The general DLM can be represented by a quadruple over time . The DLM provides a probabilistic linkage to update the posterior distribution of system states based on a priori distribution and newly available observations over time based on the Bayesian forecasting framework [19, 23, 33]. The Bayesian forecasting framework in the context of traffic speed prediction on a road network is described as follows.

##### 2.1. Bayesian Forecasting Framework

*Step 1 (initialization). *Initialize system state variables (i.e., travel speed on a road section/link) at . where denotes the estimated means of link travel speed at ; is the estimated variance based on the initial information set (i.e., historical travel speed data on network). Set .

*Step 2 (prior distribution estimation). *Estimate the prior distribution of aswhere is the normal distribution. is the estimated mean of system states, and is the estimated variance of system states. We can observe that increasing or will amplify the variance of .

*Step 3 (one-step forecast). *Estimate one-step forecast for aswhere is the mean of prediction at and is the variance of prediction at . We can observed that if (i.e., design matrix) is constant, and .

*Step 4 (posterior distribution at ). *Calculate the posterior distribution aswhere and . If, then .

*Step 5 (iterate). *Set . If then stop; otherwise go to Step 1.

The proof of the one-step forecast and the posterior distribution can be found in [23]. Note that, for the univariate DLM, it has been shown that the covariance of system evolution needs to adapt to drastic system behavior changes or regime shift [23]. Regardless of this issue will make a serious prediction bias [12]. However, none of the existing studies propose any adaptive parameter estimation for to address this issue.

We specify three DLMs, i.e., first-order DLM, cubic spline smoothing DLM, and second-order DLM with increasing complexity based on the above DLM forecasting framework for travel speed prediction on a road network. The aim is to provide the benchmarks to compare with the performance of the proposed adaptive parameter updating DLM. The three DLMs are described as follows.

*(a) First-Order DLM. *This is the basic DLM which incorporates a mean level term and a Gaussian noisy term to describe system state evolution.

*(b) Cubic Spline Smoothing DLM. *This model extends the first-order DLM by incorporating a local linear trend. The resulting system of equations is written as follows:

Equation (4) and

In terms of the quadruples of DLM, it is equivalent to

*(c) Second-Order DLM. *This model extends the cubic spline smoothing DLM by introducing a second linear trend to model changes of the trend level. The second-order DLM is described as follows:

Equations (4) and (7) and In our travel speed prediction context, is observed data of average link travel speed at time* t*. is the unknown average speed at time . is the trend of variation of averages. and are the corresponding error terms, respectively. Note that more complicated DLMs using a higher-order trend component or combining a systematic seasonal variation component and a regression component can also be specified.

#### 3. Adaptive Parameter Updating for DLM

##### 3.1. Adaptive DLM

We propose an adaptive parameter updating approach based on the first-order DLM. We have two unknown parameters, i.e., and , to be estimated. The two parameters determine the predicted system states and influence the accuracy of prediction. To estimate the unknown model parameters, we can construct the likelihood function based on observed data as a function of unknown parameters. The maximum likelihood estimation approach is used to estimate the parameters [34]. The log-likelihood function is written as follows [33, 35]: where denotes the unknown parameters, i.e., . and are the variances and means of prediction at time (see (5)), respectively. The maximum likelihood estimates (MLE) of parameters can then be obtained by solving the following optimization problemIn classical DLMs, the system parameters are constant regardless system regime changes. Fei et al. [19] proposed an intervention approach by adjusting the model error covariance based on anticipated changes from additional exterior information and/or expert’s knowledge. The drawback is expert’s adjustment might be trivial and lack a system-wide control based on the feedback of prediction errors.

Different with existing approach, we propose a two-stage algorithm by first estimating initial parameters based on a training data set and then using an online adaptive parameter updating based on the feedback of one-step prediction errors. It is similar to feedback control to optimize the model parameters. The proposed two-stage adaptive parameter updating approach is described as follows.

##### 3.2. Online Adaptive Parameter Updating Approach

The proposed approach estimates the model parameters () based on historical data and adaptively optimizes its model parameters over time based on one-step model prediction errors. The approach is described as follows.

*Step 1 (initial parameter estimation). *(i)Estimate and : given input training data set** D**, compute MLE estimates of and . Get .(ii)Optimize : given , find the optimal signal-to-noise ratio (*i.e*., ) as where is a loss function defined by the root mean square error. The optimal estimates of model error covariance for the training data set can then be obtained as .

*Step 2 (online adaptive parameter updating). *Set and and compute one-step forecast and prediction error based on (4)-(6). Given a predefined tolerable threshold , update aswhere . is kept constant. Note that one can obtain without difficulty by the golden section search or the line search approach [36].

The online adaptive parameter updating approach is shown in Figure 1.