# Short-Term Bus Passenger Demand Prediction Based on Time Series Model and Interactive Multiple Model Approach

Authors: Rui Xue; Daniel (Jian) Sun; Shukai Chen
Journal: Discrete Dynamics in Nature and Society
 (2015)

---

## Abstract

Although bus passenger demand prediction has attracted increased attention during recent years, limited research has been conducted in the context of short-term passenger demand forecasting. This paper proposes an interactive multiple model (IMM) filter algorithm-based model to predict short-term passenger demand. After aggregated in 15 min interval, passenger demand data collected from a busy bus route over four months were used to generate time series. Considering that passenger demand exhibits various characteristics in different time scales, three time series were developed, named weekly, daily, and 15 min time series. After the correlation, periodicity, and stationarity analyses, time series models were constructed. Particularly, the heteroscedasticity of time series was explored to achieve better prediction performance. Finally, IMM filter algorithm was applied to combine individual forecasting models with dynamically predicted passenger demand for next interval. Different error indices were adopted for the analyses of individual and hybrid models. The performance comparison indicates that hybrid model forecasts are superior to individual ones in accuracy. Findings of this study are of theoretical and practical significance in bus scheduling.


---

## Body

## 1. Introduction

Under the trend of public transport priority policy in major cities worldwide, more effective and prospective bus operation managements are required to provide reliable bus service. As an essential part of public transportation, short-term bus passenger demand plays an important role in resource allocation, network planning, and frequency setting. With wide application of the intelligent transportation systems, real-time passenger demand forecasting vigorously promoted the development of the dynamic bus scheduling and management. Accurate predictions of short-term bus passenger demand will not only assist in boosting bus operation efficiency, but also minimize the operation cost and improve service quality and reliability.Existing studies [1–3] focused more on the long-term passenger demand forecast, especially the long-term trend of demand development. Moreover, these methods are limited to the classical four-stage method and elasticity models [4–6]. Currently, more transit information platforms have been constructed, while the majority of platforms merely release historical transit information and fail to provide guidance in allocating the constrained transit resources properly. For the bus administrators, it is necessary to grasp changes of the bus passenger demand, so as to change passive management into an initiative one [7]. As a result, reliable prediction of short-term bus passenger demand beforehand using historical data has rather significance.The purpose of this research is to set up time series models for short-term bus passenger demand based on historical data. An Interactive Multiple Model (IMM) filter algorithm is proposed to combine predictions of time series models, so that a hybrid method can be developed for short-term bus passenger demand forecast. More specifically, the three subobjectives are as follows:(i)
to analyze the characteristics of historical data, especially stationarity, periodicity, and volatility on different time scales, then having three types of time series measured in week, day, and 15 min which were constructed based on different characteristics;
(ii)
to develop prediction models which capture different data characteristics to predict weekly, daily, and 15 min time series;
(iii)
to dynamically combine the prediction models estimations, output the hybrid prediction by applying IMM algorithm, and evaluate its performance.The remainder of this paper is structured as follows. Section2 summarizes the literature related to forecast models. Next, three time series named weekly, daily, and 15 min are constructed and the corresponding forecast models are developed in Section 3, along with the data collection and correlation analysis effort. In Section 4, IMM filter algorithm is applied to dynamically combine the models’ predictions to output the hybrid passenger demand prediction, with the model performance discussed. Finally, conclusions and recommendations for future work are provided in Section 5.


## 2. Summary of Literature Review

Many statistical models including autoregressive (AR), autoregressive integrated moving average (ARIMA), and seasonal ARIMA (SARIMA) models can be applied to time series forecasting [8, 9]. Compared with the regular statistic models, nonparametric models have limited inherent explanatory power since the training process is enveloped in a “Black Box” and consequently may not produce a unique optimal solution to the problem [10]. Given that the fundamental prediction model was set up by taking the statistical theory and method as foundation, this section particularly reviews the selected statistical models and Interactive Multiple Model algorithm. Additional nonparametric models including Artificial Neural Network model and Support Vector Machine model have also been conducted but were not reviewed here because of the space limit [11, 12].Since early 1980s, various parametric methods, including linear regression, smoothing algorithm, and autoregressive process, have been widely used in traffic forecast and achieved rather good results. The majority of effort has gone into developing methodologies that can be used to model traffic characteristics and produce anticipated conditions [13, 14]. Ahmed and Cook used 166 data sets acquired from three monitoring systems in Los Angeles, Minneapolis, and Detroit, USA, to set up variable parameter autoregressive moving average (ARMA) model and predicted the traffic state in highway based on time series theories [15]. Davis et al. proved that autoregressive model remains valid under the condition of partial data missing. Williams et al. applied the seasonal ARIMA (SARIMA) model to predict urban expressway traffic flow aiming at capturing the seasonal fluctuation characteristic of traffic flow [16]. The results suggested that SARIMA model has more effective one-step-ahead predictive ability compared with the nearest-neighbor model, neural network algorithm, and historical average model. Vlahogianni and Karlaftis proved that the temporal aggregation would alter underlying features of the source data and suggested selecting appropriate approach for the aggregated data model [17]. Gong et al. proposed a sequential framework for short-term passenger flow prediction [18]. In the framework, a seasonal ARIMA based method is presented to predict the arrival passengers, and a Kalman filter based method is proposed to predict the number of waiting passengers based on the results from SARIMA model, as well as departure passengers. The computational results confirmed that the proposed framework is effective in providing accurate and reliable passenger flow prediction. However, the residual sequence of forecasting model is not usually the white noise sequence and generally has remarkable heteroscedasticity [19]. The generalized autoregressive conditional heteroscedasticity (GARCH) model that consists of conditional mean and variance equations is able to precisely capture the heteroscedasticity of residual sequence. Gavirangaswamy et al. empirically show that SARIMA and ARIMA-GARCH exhibit similar traffic prediction trends [20]; however, ARIMA-GARCH is generally better than ARIMA and SARIMA for prediction, particularly with stable model order across different historical traffic volumes. Zhang and Haghani proposed a hybrid model, in which the deterministic part is modeled by the ARIMA model, and the volatility is captured by the GJR-GARCH model for multi-step-ahead traffic flow forecasting in a freeway system with real-time traffic flow data [21]. The results demonstrate that the method is able to unearth the underlying periodical characteristics and volatility nature of traffic flow data and demonstrate promising abilities in improving the accuracy and reliability of freeway traffic flow in multi-step-ahead forecasting. Blom presented a short-term traffic flow multistep prediction method based on similarity search of time series [22].As the milestone in the development of multiple model algorithms, Interactive Multiple Model (IMM) algorithm has the properties of recursive nature, modular construction, and fixed amount of computations and is suitable for real-time traffic condition prediction [22, 23]. Compared with the single prediction model and linear combination model algorithms, IMM algorithm eliminates the prediction errors caused by the discrepancy between characteristics of passenger demand and prediction models, and the submodel predictions are amended by Kalman filter as well. As a result, IMM algorithm has a significant increase in forecasting performance. Zhang and Liu took both the key features of different models and the advantages of hybrid model into consideration and proposed an IMM based hybrid prediction model for real-time traffic flow prediction in urban roads [24]. The analytical results show that the IMM based model is more effective and robust than the individual basic model and linear combination model. Ma et al. adopted the IMM algorithm to the context of short-term passenger demand prediction in public transport, with three time series generated [25]. The corresponding statistical models are developed to capture different time series patterns. Amended IMM algorithm is applied to combine the models’ estimation and output the passenger demand prediction dynamically. However, the research failed to construct accurate models to capture seasonal fluctuations and volatility of time series data, leading to serious prediction lag, and the IMM algorithm-based approach has not been extended to a much shorter term forecast (e.g., 5 min and 15 min).In summary, with respect to short-term bus passenger demand prediction, each prediction model tends to have its own advantages and limitations in different applications, and an individual model is limited to capture a certain feature of time series. IMM algorithm with recursiveness, modularity, and fixed calculation is applicable to short-term passenger demand prediction. The accuracy of hybrid model largely depends on the forecast precision of each single model. Therefore it is important to precisely develop time series models in order to maximize the accuracy of both single and hybrid models.


## 3. Overview of the Time Series Development

This section presents an empirical data based framework in modeling time series of bus passenger demand for hybrid model prediction.The process is summarized as follows.Step 1.
Construct three time series according to the characteristics of historical data.Step 2.
Develop the weekly, daily, and 15 min models for their corresponding time series after correlation and heteroscedastic analysis.Step 3.
Calibrate the time dependent transition probability matrix based on models’ performance using historical data.Step 4.
Combine the models’ predictions using IMM algorithm.
The first step sets up three time series based on different dependencies between historical data (week, day, and 15 min) and extract meaningful statistics characteristics of the data. The second step develops corresponding parametric models to capture the characteristics and output prediction series. The remainder of this section describes more details related to the above steps. The last two steps calibrate the transition probability matrix by comparing models’ performance and combine the submodels’ prediction series using IMM algorithm. The detailed process is presented in Section4.


### 3.1. Time Series Construction

To construct the time series of bus passenger demand, passenger boarding data from Route 54 were obtained from August to November 2013, Shenzhen, China. The boarding information was collected from Shenzhen Tong smart card system. A recent survey found that more than 80% of passengers use smart cards in Shenzhen [26]. Although the smart card readers have possible omissions in recording all passenger pick-up data, the smart card data still reflect the passenger demand effectively. The demand is the total number of passengers for all stops along Route 54 at the same duration. Route 54 is 36 km in length with 54 stops and travels mainly on the arterial roads. Many residential communities, high schools, and official buildings were located along the bus route, bringing a large amount of work and education trips in weekdays. Consequently, Route 54 has both heavy passenger demand and requirement for real-time scheduling.The historical data were aggregated in 15 min period, since 15 min is the longest departure interval of Route 54 in off-peak periods. Then, a total of 66 time intervals from 6:30 to 22:45 within a day were obtained, with public holiday data and erroneous samples excluded. Overall, 8052 sets of data are collected and divided into training set and testing set. The training set consisting of 7590 data is used to model the time series and calibrate the model parameters, while the testing set containing 462 data is used to validate the prediction accuracy of different models.To analyze the characteristics of passenger demand, line chart of historical data in August 2013 is plotted, as shown in Figure1. The line chart shows that the passenger demand is almost cyclical every week and similar for each weekday and each weekend. In addition, wide gaps in passenger demand were found between peak periods and off-peak periods, as well as weekdays and weekends, due to the reduction of work and education trips. Furthermore, an obvious asymmetry in passenger demand was identified between AM peak and PM peak. The AM peak tends to be sharper, since work and education journeys coincide at that time, whereas the PM peak is flatly spread due to education trips being earlier. In fact, passenger demand has characteristics of fluctuation clustering and obvious peaks on weekdays while the fluctuation is much flatter on weekends. The united root test (ADF test) shows that the ADF test statistical value is −10.279 which is smaller than 1% level critical value −3.963, indicating that the passenger demand is stationary. Moreover, although the peak demand is slightly lower during school summer holidays (August 1 to August 17), the passenger demand obtained from August to November has resemblance in changing regularities.Figure 1
Passenger demand in August 2013.To further analyze the characteristics of historical data, three time series were constructed for the hybrid system, including weekly, daily, and 15 min time series, aiming at reflecting the stationarity, periodicity, and volatility of real-time passenger demand. Defined
n
(
t
) as the passenger demand at time interval (
t
-
1
,
t
] for day n, t
∈
[
1,66
]. Time labels are attached to passenger demand data, and three time series were constructed as follows.(1)
Weekly time seriesT
w
n
(
t
) consists of data n
w weeks before d
n
(
t
) within the same time interval on the same weekday or weekend. Here, the time interval is set as one week:(1)
T
w
n
t
=
d
n
-
7
×
1
t
,
d
n
-
7
×
2
t
,
…
,
d
n
-
7
×
n
w
(
t
)
.
(2)
Daily time seriesT
d
n
t consists of data n
d days before d
n
(
t
) within the same time interval. Here, the time interval is set as one day:(2)
T
d
n
t
=
d
n
-
1
t
,
d
n
-
2
t
,
…
,
d
n
-
n
d
(
t
)
.
(3)
15 min time seriesT
m
n
(
t
) consists of data n
m time intervals before d
n
(
t
) on the same day. Here, the time interval is set as 15 min:(3)
T
d
n
t
=
d
n
t
-
1
,
d
n
t
-
2
,
…
,
d
n
t
-
n
m
.


### 3.2. Time Series Model Development

Statistical analysis software EViews was used to analyze the characteristics of the three time series. Stationary test was conducted by checking both trailing and truncation features of autocorrelation function (ACF), partial autocorrelation function (PACF), and augmented Dickey-Fuller (ADF) index. Seasonal analyses and cyclical identification were also carried out. For nonstationary time series, ARCH effect was tested to further check the heteroscedasticity and describe the volatility clustering effect. After the time series analyses, three prediction models, including weekly, daily, and 15 min models, were developed to capture different features of time series.According to [15–19], AR and ARMA models are suitable for modeling stationary time series, while ARIMA and ARIMA-GARCH models are capable in nonstationary series, and the periodicity of time series can be captured by SARIMA model. Consequently, the primary task of this research is to choose the best model and the corresponding order for each time series.


#### 3.2.1. Weekly Model

By the stationary test, weekly time series is proved to be a stationary sequence. ACF tails off exponentially to 0 in the sixth stage while PACF cuts off after different significant lags for different time periods of a day. BothAR
(
p
) model and ARMA
(
p
,
q
) model are appropriate for weekly time series because they are suitable in modeling stationary time series. In these models, p is the order of AR part while q is of MA part. Different orders p
∈
[
1,6
] of the AR
(
p
) model were tested to choose the appropriate order by maximizing the adjusted R
2 and minimizing Akaike information criterion (AIC) and Schwarz criterion (SC). The result shows that AR
(
3
) is the best among all AR models. The same test is applied to the ARMA
(
p
,
q
) model (
p
,
q
∈
[
1,6
]
), considering the different combination of p, q. The testing result indicates that ARMA
(
2,2
) is the best among the ARMA models. By comparing the two models, ARMA
(
2,2
) model was chosen as the appropriate weekly model.Moreover, parameter estimation is implemented by EViews, and white noise is estimated using recursive least squares (RLS) method. The weekly modelARMA
(
2
,
2
) can be written as(4)
y
w
t
=
φ
w
1
y
w
t
-
1
+
φ
w
2
y
w
t
-
2
+
a
w
t
+
θ
w
1
a
w
t
-
1
+
θ
w
2
a
w
t
-
2
,wherey
w is the prediction result of ARMA model,
a
w is the white noise of time series, a
w
∈
N
(
0,0.016
),
φ
w, θ
w are the parameters of weekly model.Parameters of weekly model including standard error andt-test result are presented in Table 2. The fitting mean absolute percentage error (MAPE) is 24.2% and the variance of absolute percentage error (VAPE) is 26.3% for the weekly training data set. Figure 2(a) shows the fitting results of ARMA model for Wednesdays in the weekly time series. It can be observed that the weekly model generally tracks the trend of weekly time series. It is important to point out that model performance varies largely for the same time period in different weeks. ARMA model provides appropriate forecast in AM peak hour but fails to forecast the passenger demand during off-peak period especially in the period after AM peak (black circle). This is due to the ineffectiveness of ARMA model in capturing volatility. In contrast to work and education travel, trips at such times of day are more flexible and ARMA model is ineffective in capturing volatility. Moreover, an obvious lag is identified on the ARMA model prediction (red circle), because the time series of passenger demand are affected by both their own lagged terms and other traffic condition relevant factors.Figure 2
Fitting results of weekly, daily, and 15 min model, (a) fitting result of ARMA model, (b) fitting result of SARIMA model, (c) fitting result of ARIMA-GARCH model on weekday, and (d) fitting result of ARIMA-GARCH model on weekend.
(a)
(b)
(c)
(d)


#### 3.2.2. Daily Model

Stationary test shows that the daily time series displays a stationary distribution with irregular variations as well. By checking ACF and PACF, ACF shows obvious cyclical fluctuations within a narrow range, which suggests that there is no need to conduct difference in daily time series. The cycle length is 24 because the time interval of daily time series is 24 hours, which means that for the same time period existing data can be used to predict the data on next day.TheSARIMA
(
p
,
d
,
q
)
P
,
D
,
Q
s model is selected to handle the seasonal cyclic time series forecast. In this model, the parameters p and q are the orders of nonseasonal ARMA process, while P and Q are of seasonal ones; d is the nonseasonal differencing order while D is the seasonal one; S is the cycle length of SARIMA model. After checking adjusted R
2, AIC, and SC of different order combination, SARIMA
(
2,0
,
3
)
1,0
,
0
24 model is constructed. By contrast, the first-order seasonal difference is applied to daily time series to eliminate the seasonality, and then the SARIMA
1,0
,
0
0,1
,
0
24 model is set up. By comparing the two models, SARIMA
2,0
,
3
1,0
,
0
24 model is proved to have better performance.After parameter estimation, the daily modelSARIMA
(
2,0
,
3
)
1,0
,
0
24 can be written as(5)
y
d
i
=
φ
d
1
y
d
i
-
1
+
φ
d
2
y
d
i
-
2
+
φ
d
3
y
d
i
-
24
+
φ
d
4
y
d
i
-
25
+
φ
d
5
y
d
i
-
26
+
a
d
i
+
θ
d
1
a
d
i
-
1
+
θ
d
2
a
d
i
-
2
+
θ
d
3
a
d
i
-
3
,wherey
d is the prediction result of SARIMA model,
a
d is the white noise of time series, a
d
∈
N
(
0,0.029
),
φ
d, θ
d are the parameters of daily model.Parameters of daily model including standard error andt-test result are presented in Table 2. The fitting MAPE is 25.0% and VAPE is 27.2% for the daily time series. Figure 2(b) shows the SARIMA model fitting results for first week of August; particularly Day 3 and Day 4 are weekends, and the others are weekdays. It is observed that the daily model precisely captures the seasonal fluctuations of daily time series and provides good prediction for both weekdays and weekends. Compared with ARMA model, the SARIMA model has better performance especially in the nonpeak periods and the prediction lag is improved as well.In conclusion, the SARIMA model provides appropriate forecast for the time series with seasonal trends. However, the fitting curves are still smooth in the nonpeak period (black circle). The hysteresis of SARIMA model predictions requires further improvement (red circle).


#### 3.2.3. 15 min Model

In 15 min time series, bus passenger demand data fluctuate greatly within a day and have two obvious peaks in the morning (7:00 to 9:00) and afternoon (17:00 to 19:00). According to previous studies, passenger arrival rate in nonpeak approximately follows Poisson distribution and leads to the raise of randomness of passenger demand. ACF, PACF, and ADF tests show that the 15 min time series is a nonstationary random sequence. Therefore, variation is required to eliminate the strong fluctuation of 15 min time series. The ACF tails off quickly to 0 while the PACF truncates in the second order after first-order difference, indicating that the 15 min time series become stationary.ARIMA
(
p
,
d
,
q
) model is selected to model the differentiated time series. In the ARIMA model, p and q are orders of ARMA process, differencing order d
=
1 because first-order difference was applied. After checking adjusted R
2, AIC, and SC of different p, q orders’ combination (
p
,
q
∈
[
0,6
]
), ARIMA
(
2,1
,
0
) is proved to be the best model. Considering the fluctuation clustering effect, sharp peaks, and fat tail distributions of the 15 min time series, the residuals of ARIMA model have obvious heteroscedasticity and autocorrelation. To construct a more accurate 15 min model, ARCH effect is tested further based on the ARIMA
(
2,1
,
0
) model. The autocorrelation function figure of model residuals has a tendency of slow attenuation after first order, which indicates that the sequences of residual sum of squares can be fitted by autoregression model. In the ARCH-LM test, probabilities of F-test and chi-square test results are equal to 0, indicating the obvious ARCH effect in the 15 min time series. Above all, the GARCH
(
1,1
) model regarded as the most versatile and flexible model [20] is added to describe the heteroscedasticity.After parameter estimation, 15 min modelARIMA
(
2,1
,
0
)-GARCH
(
1,1
) can be written as(6)
y
m
t
=
φ
m
1
y
m
t
-
1
+
φ
m
2
y
m
t
-
2
+
φ
m
3
y
m
t
-
3
+
a
m
(
t
)
,
σ
t
2
=
θ
m
0
+
θ
m
1
a
m
t
-
1
+
ψ
m
1
σ
t
-
1
2
,wherey
m is the prediction result of ARIMA model,
a
m is the white noise of time series, a
m
(
t
)
∈
N
(
0,0.005
σ
t
2
),
φ
m is the parameter of ARIMA model,
θ
m, ψ
m are the parameters of GARCH model.Parameters of 15 min model are presented in Table2 as well as standard error and t-test values. The fitting MAPE is 23.8% and VAPE is 17.4% for the 15 min time series. Figures 2(c) and 2(d) present the ARIMA-GARCH model fitting results for August 1 and August 3, 2013. It can be observed that the 15 min model overcomes the influences by high data fluctuation precision of prediction and also enhances the self-adaptability. Compared with the ARIMA model, the ARIMA-GARCH model provides more accurate prediction for both peak and nonpeak periods. In particular in the nonpeak periods, the 15 min model precisely captures the characteristic of fluctuation clustering. Furthermore, the forecasting lag was eliminated. However, the predictions for the peak hour on weekday (red circle) and nonpeak on weekend (black circle) slightly deviate from the historical data. The 15 min model could be complementary to the weekly and daily model.Table1 shows the goodness of fit of different models, indicating that the models chosen in this study have comparable larger adjusted R
2 and smaller AIC, SC values, and thus are superior to their alternatives.Table 1
Result of goodness of fit test.
Model
AdjustedR
2
AIC
SC
ARMA(2,2)
0.882
11.755
11.785
AR(3)
0.879
11.777
11.801
SARIMA(2,0,3)(1,0,0)24
0.874
11.693
11.715
SARIMA(1,0,0)(0,1,0)24
0.863
11.704
11.726
ARIMA(2,1,0)-GARCH(1,1)
0.795
10.841
11.045
ARIMA(2,1,0)
0.719
11.857
11.959Table 2
Parameters of weekly, daily, and 15 min model.
Model
Parameter
Coefficient
Standard error
t-statistic
Weekly model
φ
w
1
1.563
0.046
34.428
φ
w
2
−0.704
0.042
−16.938
θ
w
1
0.444
0.052
−8.607
θ
w
2
−0.311
0.040
7.879
Daily model
φ
d
1
1.436
0.049
29.103
φ
d
2
−0.593
0.042
−14.053
φ
d
3
0.071
0.053
6.153
φ
d
4
−0.102
0.032
−11.266
φ
d
5
0.042
0.022
7.556
θ
d
1
0.323
0.035
8.143
θ
d
2
−0.278
0.022
−3.378
θ
d
3
−0.109
0.016
−3.153
15 min model
φ
m
1
0.090
0.115
1.785
φ
m
2
0.249
0.128
2.657
φ
m
3
−0.340
0.112
−2.478
θ
m
0
187.180
1.300
1.441
θ
m
1
0.538
0.332
1.617
ψ
m
1
0.414
0.184
2.248Table2 presents the parameters of weekly, daily, and 15 min model. Results from t-test indicate that coefficients of prediction models’ parameters are significant at 95% levels. Figure 2 shows the fitting results of weekly, daily, and 15 min model.Figure2 shows the fitting results of weekly, daily, and 15 min model.In summary, the weekly, daily, and 15 min models generally capture the particular characteristics of their corresponding time series; however the forecasting performances vary because of the inability of single model to capture every feature of time series. When the prediction model is not consistent with the current bus passenger demand state, the prediction errors become larger. The prediction results of the single model indicate that it is impossible to develop a single model to provide accurate prediction for all situations. The feasible and effective way of using the single model for forecasting is to amplify the advantages and avoid the disadvantages. Given all of these, the IMM algorithm is proposed in Section4 to dynamically synthesize all advantages of the weekly, daily, and 15 min models.


## 3.1. Time Series Construction

To construct the time series of bus passenger demand, passenger boarding data from Route 54 were obtained from August to November 2013, Shenzhen, China. The boarding information was collected from Shenzhen Tong smart card system. A recent survey found that more than 80% of passengers use smart cards in Shenzhen [26]. Although the smart card readers have possible omissions in recording all passenger pick-up data, the smart card data still reflect the passenger demand effectively. The demand is the total number of passengers for all stops along Route 54 at the same duration. Route 54 is 36 km in length with 54 stops and travels mainly on the arterial roads. Many residential communities, high schools, and official buildings were located along the bus route, bringing a large amount of work and education trips in weekdays. Consequently, Route 54 has both heavy passenger demand and requirement for real-time scheduling.The historical data were aggregated in 15 min period, since 15 min is the longest departure interval of Route 54 in off-peak periods. Then, a total of 66 time intervals from 6:30 to 22:45 within a day were obtained, with public holiday data and erroneous samples excluded. Overall, 8052 sets of data are collected and divided into training set and testing set. The training set consisting of 7590 data is used to model the time series and calibrate the model parameters, while the testing set containing 462 data is used to validate the prediction accuracy of different models.To analyze the characteristics of passenger demand, line chart of historical data in August 2013 is plotted, as shown in Figure1. The line chart shows that the passenger demand is almost cyclical every week and similar for each weekday and each weekend. In addition, wide gaps in passenger demand were found between peak periods and off-peak periods, as well as weekdays and weekends, due to the reduction of work and education trips. Furthermore, an obvious asymmetry in passenger demand was identified between AM peak and PM peak. The AM peak tends to be sharper, since work and education journeys coincide at that time, whereas the PM peak is flatly spread due to education trips being earlier. In fact, passenger demand has characteristics of fluctuation clustering and obvious peaks on weekdays while the fluctuation is much flatter on weekends. The united root test (ADF test) shows that the ADF test statistical value is −10.279 which is smaller than 1% level critical value −3.963, indicating that the passenger demand is stationary. Moreover, although the peak demand is slightly lower during school summer holidays (August 1 to August 17), the passenger demand obtained from August to November has resemblance in changing regularities.Figure 1
Passenger demand in August 2013.To further analyze the characteristics of historical data, three time series were constructed for the hybrid system, including weekly, daily, and 15 min time series, aiming at reflecting the stationarity, periodicity, and volatility of real-time passenger demand. Defined
n
(
t
) as the passenger demand at time interval (
t
-
1
,
t
] for day n, t
∈
[
1,66
]. Time labels are attached to passenger demand data, and three time series were constructed as follows.(1)
Weekly time seriesT
w
n
(
t
) consists of data n
w weeks before d
n
(
t
) within the same time interval on the same weekday or weekend. Here, the time interval is set as one week:(1)
T
w
n
t
=
d
n
-
7
×
1
t
,
d
n
-
7
×
2
t
,
…
,
d
n
-
7
×
n
w
(
t
)
.
(2)
Daily time seriesT
d
n
t consists of data n
d days before d
n
(
t
) within the same time interval. Here, the time interval is set as one day:(2)
T
d
n
t
=
d
n
-
1
t
,
d
n
-
2
t
,
…
,
d
n
-
n
d
(
t
)
.
(3)
15 min time seriesT
m
n
(
t
) consists of data n
m time intervals before d
n
(
t
) on the same day. Here, the time interval is set as 15 min:(3)
T
d
n
t
=
d
n
t
-
1
,
d
n
t
-
2
,
…
,
d
n
t
-
n
m
.


## 3.2. Time Series Model Development

Statistical analysis software EViews was used to analyze the characteristics of the three time series. Stationary test was conducted by checking both trailing and truncation features of autocorrelation function (ACF), partial autocorrelation function (PACF), and augmented Dickey-Fuller (ADF) index. Seasonal analyses and cyclical identification were also carried out. For nonstationary time series, ARCH effect was tested to further check the heteroscedasticity and describe the volatility clustering effect. After the time series analyses, three prediction models, including weekly, daily, and 15 min models, were developed to capture different features of time series.According to [15–19], AR and ARMA models are suitable for modeling stationary time series, while ARIMA and ARIMA-GARCH models are capable in nonstationary series, and the periodicity of time series can be captured by SARIMA model. Consequently, the primary task of this research is to choose the best model and the corresponding order for each time series.


### 3.2.1. Weekly Model

By the stationary test, weekly time series is proved to be a stationary sequence. ACF tails off exponentially to 0 in the sixth stage while PACF cuts off after different significant lags for different time periods of a day. BothAR
(
p
) model and ARMA
(
p
,
q
) model are appropriate for weekly time series because they are suitable in modeling stationary time series. In these models, p is the order of AR part while q is of MA part. Different orders p
∈
[
1,6
] of the AR
(
p
) model were tested to choose the appropriate order by maximizing the adjusted R
2 and minimizing Akaike information criterion (AIC) and Schwarz criterion (SC). The result shows that AR
(
3
) is the best among all AR models. The same test is applied to the ARMA
(
p
,
q
) model (
p
,
q
∈
[
1,6
]
), considering the different combination of p, q. The testing result indicates that ARMA
(
2,2
) is the best among the ARMA models. By comparing the two models, ARMA
(
2,2
) model was chosen as the appropriate weekly model.Moreover, parameter estimation is implemented by EViews, and white noise is estimated using recursive least squares (RLS) method. The weekly modelARMA
(
2
,
2
) can be written as(4)
y
w
t
=
φ
w
1
y
w
t
-
1
+
φ
w
2
y
w
t
-
2
+
a
w
t
+
θ
w
1
a
w
t
-
1
+
θ
w
2
a
w
t
-
2
,wherey
w is the prediction result of ARMA model,
a
w is the white noise of time series, a
w
∈
N
(
0,0.016
),
φ
w, θ
w are the parameters of weekly model.Parameters of weekly model including standard error andt-test result are presented in Table 2. The fitting mean absolute percentage error (MAPE) is 24.2% and the variance of absolute percentage error (VAPE) is 26.3% for the weekly training data set. Figure 2(a) shows the fitting results of ARMA model for Wednesdays in the weekly time series. It can be observed that the weekly model generally tracks the trend of weekly time series. It is important to point out that model performance varies largely for the same time period in different weeks. ARMA model provides appropriate forecast in AM peak hour but fails to forecast the passenger demand during off-peak period especially in the period after AM peak (black circle). This is due to the ineffectiveness of ARMA model in capturing volatility. In contrast to work and education travel, trips at such times of day are more flexible and ARMA model is ineffective in capturing volatility. Moreover, an obvious lag is identified on the ARMA model prediction (red circle), because the time series of passenger demand are affected by both their own lagged terms and other traffic condition relevant factors.Figure 2
Fitting results of weekly, daily, and 15 min model, (a) fitting result of ARMA model, (b) fitting result of SARIMA model, (c) fitting result of ARIMA-GARCH model on weekday, and (d) fitting result of ARIMA-GARCH model on weekend.
(a)
(b)
(c)
(d)


### 3.2.2. Daily Model

Stationary test shows that the daily time series displays a stationary distribution with irregular variations as well. By checking ACF and PACF, ACF shows obvious cyclical fluctuations within a narrow range, which suggests that there is no need to conduct difference in daily time series. The cycle length is 24 because the time interval of daily time series is 24 hours, which means that for the same time period existing data can be used to predict the data on next day.TheSARIMA
(
p
,
d
,
q
)
P
,
D
,
Q
s model is selected to handle the seasonal cyclic time series forecast. In this model, the parameters p and q are the orders of nonseasonal ARMA process, while P and Q are of seasonal ones; d is the nonseasonal differencing order while D is the seasonal one; S is the cycle length of SARIMA model. After checking adjusted R
2, AIC, and SC of different order combination, SARIMA
(
2,0
,
3
)
1,0
,
0
24 model is constructed. By contrast, the first-order seasonal difference is applied to daily time series to eliminate the seasonality, and then the SARIMA
1,0
,
0
0,1
,
0
24 model is set up. By comparing the two models, SARIMA
2,0
,
3
1,0
,
0
24 model is proved to have better performance.After parameter estimation, the daily modelSARIMA
(
2,0
,
3
)
1,0
,
0
24 can be written as(5)
y
d
i
=
φ
d
1
y
d
i
-
1
+
φ
d
2
y
d
i
-
2
+
φ
d
3
y
d
i
-
24
+
φ
d
4
y
d
i
-
25
+
φ
d
5
y
d
i
-
26
+
a
d
i
+
θ
d
1
a
d
i
-
1
+
θ
d
2
a
d
i
-
2
+
θ
d
3
a
d
i
-
3
,wherey
d is the prediction result of SARIMA model,
a
d is the white noise of time series, a
d
∈
N
(
0,0.029
),
φ
d, θ
d are the parameters of daily model.Parameters of daily model including standard error andt-test result are presented in Table 2. The fitting MAPE is 25.0% and VAPE is 27.2% for the daily time series. Figure 2(b) shows the SARIMA model fitting results for first week of August; particularly Day 3 and Day 4 are weekends, and the others are weekdays. It is observed that the daily model precisely captures the seasonal fluctuations of daily time series and provides good prediction for both weekdays and weekends. Compared with ARMA model, the SARIMA model has better performance especially in the nonpeak periods and the prediction lag is improved as well.In conclusion, the SARIMA model provides appropriate forecast for the time series with seasonal trends. However, the fitting curves are still smooth in the nonpeak period (black circle). The hysteresis of SARIMA model predictions requires further improvement (red circle).


### 3.2.3. 15 min Model

In 15 min time series, bus passenger demand data fluctuate greatly within a day and have two obvious peaks in the morning (7:00 to 9:00) and afternoon (17:00 to 19:00). According to previous studies, passenger arrival rate in nonpeak approximately follows Poisson distribution and leads to the raise of randomness of passenger demand. ACF, PACF, and ADF tests show that the 15 min time series is a nonstationary random sequence. Therefore, variation is required to eliminate the strong fluctuation of 15 min time series. The ACF tails off quickly to 0 while the PACF truncates in the second order after first-order difference, indicating that the 15 min time series become stationary.ARIMA
(
p
,
d
,
q
) model is selected to model the differentiated time series. In the ARIMA model, p and q are orders of ARMA process, differencing order d
=
1 because first-order difference was applied. After checking adjusted R
2, AIC, and SC of different p, q orders’ combination (
p
,
q
∈
[
0,6
]
), ARIMA
(
2,1
,
0
) is proved to be the best model. Considering the fluctuation clustering effect, sharp peaks, and fat tail distributions of the 15 min time series, the residuals of ARIMA model have obvious heteroscedasticity and autocorrelation. To construct a more accurate 15 min model, ARCH effect is tested further based on the ARIMA
(
2,1
,
0
) model. The autocorrelation function figure of model residuals has a tendency of slow attenuation after first order, which indicates that the sequences of residual sum of squares can be fitted by autoregression model. In the ARCH-LM test, probabilities of F-test and chi-square test results are equal to 0, indicating the obvious ARCH effect in the 15 min time series. Above all, the GARCH
(
1,1
) model regarded as the most versatile and flexible model [20] is added to describe the heteroscedasticity.After parameter estimation, 15 min modelARIMA
(
2,1
,
0
)-GARCH
(
1,1
) can be written as(6)
y
m
t
=
φ
m
1
y
m
t
-
1
+
φ
m
2
y
m
t
-
2
+
φ
m
3
y
m
t
-
3
+
a
m
(
t
)
,
σ
t
2
=
θ
m
0
+
θ
m
1
a
m
t
-
1
+
ψ
m
1
σ
t
-
1
2
,wherey
m is the prediction result of ARIMA model,
a
m is the white noise of time series, a
m
(
t
)
∈
N
(
0,0.005
σ
t
2
),
φ
m is the parameter of ARIMA model,
θ
m, ψ
m are the parameters of GARCH model.Parameters of 15 min model are presented in Table2 as well as standard error and t-test values. The fitting MAPE is 23.8% and VAPE is 17.4% for the 15 min time series. Figures 2(c) and 2(d) present the ARIMA-GARCH model fitting results for August 1 and August 3, 2013. It can be observed that the 15 min model overcomes the influences by high data fluctuation precision of prediction and also enhances the self-adaptability. Compared with the ARIMA model, the ARIMA-GARCH model provides more accurate prediction for both peak and nonpeak periods. In particular in the nonpeak periods, the 15 min model precisely captures the characteristic of fluctuation clustering. Furthermore, the forecasting lag was eliminated. However, the predictions for the peak hour on weekday (red circle) and nonpeak on weekend (black circle) slightly deviate from the historical data. The 15 min model could be complementary to the weekly and daily model.Table1 shows the goodness of fit of different models, indicating that the models chosen in this study have comparable larger adjusted R
2 and smaller AIC, SC values, and thus are superior to their alternatives.Table 1
Result of goodness of fit test.
Model
AdjustedR
2
AIC
SC
ARMA(2,2)
0.882
11.755
11.785
AR(3)
0.879
11.777
11.801
SARIMA(2,0,3)(1,0,0)24
0.874
11.693
11.715
SARIMA(1,0,0)(0,1,0)24
0.863
11.704
11.726
ARIMA(2,1,0)-GARCH(1,1)
0.795
10.841
11.045
ARIMA(2,1,0)
0.719
11.857
11.959Table 2
Parameters of weekly, daily, and 15 min model.
Model
Parameter
Coefficient
Standard error
t-statistic
Weekly model
φ
w
1
1.563
0.046
34.428
φ
w
2
−0.704
0.042
−16.938
θ
w
1
0.444
0.052
−8.607
θ
w
2
−0.311
0.040
7.879
Daily model
φ
d
1
1.436
0.049
29.103
φ
d
2
−0.593
0.042
−14.053
φ
d
3
0.071
0.053
6.153
φ
d
4
−0.102
0.032
−11.266
φ
d
5
0.042
0.022
7.556
θ
d
1
0.323
0.035
8.143
θ
d
2
−0.278
0.022
−3.378
θ
d
3
−0.109
0.016
−3.153
15 min model
φ
m
1
0.090
0.115
1.785
φ
m
2
0.249
0.128
2.657
φ
m
3
−0.340
0.112
−2.478
θ
m
0
187.180
1.300
1.441
θ
m
1
0.538
0.332
1.617
ψ
m
1
0.414
0.184
2.248Table2 presents the parameters of weekly, daily, and 15 min model. Results from t-test indicate that coefficients of prediction models’ parameters are significant at 95% levels. Figure 2 shows the fitting results of weekly, daily, and 15 min model.Figure2 shows the fitting results of weekly, daily, and 15 min model.In summary, the weekly, daily, and 15 min models generally capture the particular characteristics of their corresponding time series; however the forecasting performances vary because of the inability of single model to capture every feature of time series. When the prediction model is not consistent with the current bus passenger demand state, the prediction errors become larger. The prediction results of the single model indicate that it is impossible to develop a single model to provide accurate prediction for all situations. The feasible and effective way of using the single model for forecasting is to amplify the advantages and avoid the disadvantages. Given all of these, the IMM algorithm is proposed in Section4 to dynamically synthesize all advantages of the weekly, daily, and 15 min models.


## 3.2.1. Weekly Model

By the stationary test, weekly time series is proved to be a stationary sequence. ACF tails off exponentially to 0 in the sixth stage while PACF cuts off after different significant lags for different time periods of a day. BothAR
(
p
) model and ARMA
(
p
,
q
) model are appropriate for weekly time series because they are suitable in modeling stationary time series. In these models, p is the order of AR part while q is of MA part. Different orders p
∈
[
1,6
] of the AR
(
p
) model were tested to choose the appropriate order by maximizing the adjusted R
2 and minimizing Akaike information criterion (AIC) and Schwarz criterion (SC). The result shows that AR
(
3
) is the best among all AR models. The same test is applied to the ARMA
(
p
,
q
) model (
p
,
q
∈
[
1,6
]
), considering the different combination of p, q. The testing result indicates that ARMA
(
2,2
) is the best among the ARMA models. By comparing the two models, ARMA
(
2,2
) model was chosen as the appropriate weekly model.Moreover, parameter estimation is implemented by EViews, and white noise is estimated using recursive least squares (RLS) method. The weekly modelARMA
(
2
,
2
) can be written as(4)
y
w
t
=
φ
w
1
y
w
t
-
1
+
φ
w
2
y
w
t
-
2
+
a
w
t
+
θ
w
1
a
w
t
-
1
+
θ
w
2
a
w
t
-
2
,wherey
w is the prediction result of ARMA model,
a
w is the white noise of time series, a
w
∈
N
(
0,0.016
),
φ
w, θ
w are the parameters of weekly model.Parameters of weekly model including standard error andt-test result are presented in Table 2. The fitting mean absolute percentage error (MAPE) is 24.2% and the variance of absolute percentage error (VAPE) is 26.3% for the weekly training data set. Figure 2(a) shows the fitting results of ARMA model for Wednesdays in the weekly time series. It can be observed that the weekly model generally tracks the trend of weekly time series. It is important to point out that model performance varies largely for the same time period in different weeks. ARMA model provides appropriate forecast in AM peak hour but fails to forecast the passenger demand during off-peak period especially in the period after AM peak (black circle). This is due to the ineffectiveness of ARMA model in capturing volatility. In contrast to work and education travel, trips at such times of day are more flexible and ARMA model is ineffective in capturing volatility. Moreover, an obvious lag is identified on the ARMA model prediction (red circle), because the time series of passenger demand are affected by both their own lagged terms and other traffic condition relevant factors.Figure 2
Fitting results of weekly, daily, and 15 min model, (a) fitting result of ARMA model, (b) fitting result of SARIMA model, (c) fitting result of ARIMA-GARCH model on weekday, and (d) fitting result of ARIMA-GARCH model on weekend.
(a)
(b)
(c)
(d)


## 3.2.2. Daily Model

Stationary test shows that the daily time series displays a stationary distribution with irregular variations as well. By checking ACF and PACF, ACF shows obvious cyclical fluctuations within a narrow range, which suggests that there is no need to conduct difference in daily time series. The cycle length is 24 because the time interval of daily time series is 24 hours, which means that for the same time period existing data can be used to predict the data on next day.TheSARIMA
(
p
,
d
,
q
)
P
,
D
,
Q
s model is selected to handle the seasonal cyclic time series forecast. In this model, the parameters p and q are the orders of nonseasonal ARMA process, while P and Q are of seasonal ones; d is the nonseasonal differencing order while D is the seasonal one; S is the cycle length of SARIMA model. After checking adjusted R
2, AIC, and SC of different order combination, SARIMA
(
2,0
,
3
)
1,0
,
0
24 model is constructed. By contrast, the first-order seasonal difference is applied to daily time series to eliminate the seasonality, and then the SARIMA
1,0
,
0
0,1
,
0
24 model is set up. By comparing the two models, SARIMA
2,0
,
3
1,0
,
0
24 model is proved to have better performance.After parameter estimation, the daily modelSARIMA
(
2,0
,
3
)
1,0
,
0
24 can be written as(5)
y
d
i
=
φ
d
1
y
d
i
-
1
+
φ
d
2
y
d
i
-
2
+
φ
d
3
y
d
i
-
24
+
φ
d
4
y
d
i
-
25
+
φ
d
5
y
d
i
-
26
+
a
d
i
+
θ
d
1
a
d
i
-
1
+
θ
d
2
a
d
i
-
2
+
θ
d
3
a
d
i
-
3
,wherey
d is the prediction result of SARIMA model,
a
d is the white noise of time series, a
d
∈
N
(
0,0.029
),
φ
d, θ
d are the parameters of daily model.Parameters of daily model including standard error andt-test result are presented in Table 2. The fitting MAPE is 25.0% and VAPE is 27.2% for the daily time series. Figure 2(b) shows the SARIMA model fitting results for first week of August; particularly Day 3 and Day 4 are weekends, and the others are weekdays. It is observed that the daily model precisely captures the seasonal fluctuations of daily time series and provides good prediction for both weekdays and weekends. Compared with ARMA model, the SARIMA model has better performance especially in the nonpeak periods and the prediction lag is improved as well.In conclusion, the SARIMA model provides appropriate forecast for the time series with seasonal trends. However, the fitting curves are still smooth in the nonpeak period (black circle). The hysteresis of SARIMA model predictions requires further improvement (red circle).


## 3.2.3. 15 min Model

In 15 min time series, bus passenger demand data fluctuate greatly within a day and have two obvious peaks in the morning (7:00 to 9:00) and afternoon (17:00 to 19:00). According to previous studies, passenger arrival rate in nonpeak approximately follows Poisson distribution and leads to the raise of randomness of passenger demand. ACF, PACF, and ADF tests show that the 15 min time series is a nonstationary random sequence. Therefore, variation is required to eliminate the strong fluctuation of 15 min time series. The ACF tails off quickly to 0 while the PACF truncates in the second order after first-order difference, indicating that the 15 min time series become stationary.ARIMA
(
p
,
d
,
q
) model is selected to model the differentiated time series. In the ARIMA model, p and q are orders of ARMA process, differencing order d
=
1 because first-order difference was applied. After checking adjusted R
2, AIC, and SC of different p, q orders’ combination (
p
,
q
∈
[
0,6
]
), ARIMA
(
2,1
,
0
) is proved to be the best model. Considering the fluctuation clustering effect, sharp peaks, and fat tail distributions of the 15 min time series, the residuals of ARIMA model have obvious heteroscedasticity and autocorrelation. To construct a more accurate 15 min model, ARCH effect is tested further based on the ARIMA
(
2,1
,
0
) model. The autocorrelation function figure of model residuals has a tendency of slow attenuation after first order, which indicates that the sequences of residual sum of squares can be fitted by autoregression model. In the ARCH-LM test, probabilities of F-test and chi-square test results are equal to 0, indicating the obvious ARCH effect in the 15 min time series. Above all, the GARCH
(
1,1
) model regarded as the most versatile and flexible model [20] is added to describe the heteroscedasticity.After parameter estimation, 15 min modelARIMA
(
2,1
,
0
)-GARCH
(
1,1
) can be written as(6)
y
m
t
=
φ
m
1
y
m
t
-
1
+
φ
m
2
y
m
t
-
2
+
φ
m
3
y
m
t
-
3
+
a
m
(
t
)
,
σ
t
2
=
θ
m
0
+
θ
m
1
a
m
t
-
1
+
ψ
m
1
σ
t
-
1
2
,wherey
m is the prediction result of ARIMA model,
a
m is the white noise of time series, a
m
(
t
)
∈
N
(
0,0.005
σ
t
2
),
φ
m is the parameter of ARIMA model,
θ
m, ψ
m are the parameters of GARCH model.Parameters of 15 min model are presented in Table2 as well as standard error and t-test values. The fitting MAPE is 23.8% and VAPE is 17.4% for the 15 min time series. Figures 2(c) and 2(d) present the ARIMA-GARCH model fitting results for August 1 and August 3, 2013. It can be observed that the 15 min model overcomes the influences by high data fluctuation precision of prediction and also enhances the self-adaptability. Compared with the ARIMA model, the ARIMA-GARCH model provides more accurate prediction for both peak and nonpeak periods. In particular in the nonpeak periods, the 15 min model precisely captures the characteristic of fluctuation clustering. Furthermore, the forecasting lag was eliminated. However, the predictions for the peak hour on weekday (red circle) and nonpeak on weekend (black circle) slightly deviate from the historical data. The 15 min model could be complementary to the weekly and daily model.Table1 shows the goodness of fit of different models, indicating that the models chosen in this study have comparable larger adjusted R
2 and smaller AIC, SC values, and thus are superior to their alternatives.Table 1
Result of goodness of fit test.
Model
AdjustedR
2
AIC
SC
ARMA(2,2)
0.882
11.755
11.785
AR(3)
0.879
11.777
11.801
SARIMA(2,0,3)(1,0,0)24
0.874
11.693
11.715
SARIMA(1,0,0)(0,1,0)24
0.863
11.704
11.726
ARIMA(2,1,0)-GARCH(1,1)
0.795
10.841
11.045
ARIMA(2,1,0)
0.719
11.857
11.959Table 2
Parameters of weekly, daily, and 15 min model.
Model
Parameter
Coefficient
Standard error
t-statistic
Weekly model
φ
w
1
1.563
0.046
34.428
φ
w
2
−0.704
0.042
−16.938
θ
w
1
0.444
0.052
−8.607
θ
w
2
−0.311
0.040
7.879
Daily model
φ
d
1
1.436
0.049
29.103
φ
d
2
−0.593
0.042
−14.053
φ
d
3
0.071
0.053
6.153
φ
d
4
−0.102
0.032
−11.266
φ
d
5
0.042
0.022
7.556
θ
d
1
0.323
0.035
8.143
θ
d
2
−0.278
0.022
−3.378
θ
d
3
−0.109
0.016
−3.153
15 min model
φ
m
1
0.090
0.115
1.785
φ
m
2
0.249
0.128
2.657
φ
m
3
−0.340
0.112
−2.478
θ
m
0
187.180
1.300
1.441
θ
m
1
0.538
0.332
1.617
ψ
m
1
0.414
0.184
2.248Table2 presents the parameters of weekly, daily, and 15 min model. Results from t-test indicate that coefficients of prediction models’ parameters are significant at 95% levels. Figure 2 shows the fitting results of weekly, daily, and 15 min model.Figure2 shows the fitting results of weekly, daily, and 15 min model.In summary, the weekly, daily, and 15 min models generally capture the particular characteristics of their corresponding time series; however the forecasting performances vary because of the inability of single model to capture every feature of time series. When the prediction model is not consistent with the current bus passenger demand state, the prediction errors become larger. The prediction results of the single model indicate that it is impossible to develop a single model to provide accurate prediction for all situations. The feasible and effective way of using the single model for forecasting is to amplify the advantages and avoid the disadvantages. Given all of these, the IMM algorithm is proposed in Section4 to dynamically synthesize all advantages of the weekly, daily, and 15 min models.


## 4. IMM Algorithm Implementation and Validation

The basic idea of IMM algorithm is to match the different states of data with different models and thus eliminates errors of using a single model. The forecast improvement strategy of the proposed IMM algorithm is twofold, to develop appropriate prediction models and to estimate prior model combinations for the next interval. The IMM based hybrid prediction is a recursive approach. In each cycle, the algorithm consists of four steps: model-conditional reinitialization, model-conditional filtering, probability updating, and hybrid output. In this study, state vectors are generated by state space models. We use homogeneous Markov chain to achieve the transformation between different models and calculate the transition probability matrix using submodel predictions. We apply Kalman filter in model-conditional filtering, and predictions of submodels are optimized by Kalman filter. The Kalman filter algorithm works in a two-step process. In the prediction step, the Kalman filter produces estimates of the current state variables, along with their uncertainties. Once the outcome of the next measurement (necessarily corrupted with some amount of error, including random noise) is observed, these estimates are updated using a weighted average, with more weight being given to estimates with higher certainty.A detailed process of the IMM algorithm is provided below.Step 1 (model-conditional reinitialization).
Calculate the mixed state and covariance at timet based on transition probability matrix.Step 2 (model-conditional filtering).
Update the estimations for each model using Kalman filter algorithm and calculate the prediction residual and covariance with the input of real-time passenger demand.Step 3 (probability updating).
Update the probability for each model based on likelihood function of each model using the prediction residual and covariance in Step 2.Step 4 (hybrid output).
Calculate the final estimation at timet by combining the updated estimations at time t.


### 4.1. State Space Model

In order to input the predictions into hybrid system, the weekly, daily, and 15 min models should be adopted to space station models. DefiningM
=
{
m
1
,
m
2
,
m
3
} as the model set of hybrid system, the state space model is written as(7)
y
t
+
1
=
F
j
t
y
t
+
G
j
t
w
t
,
Z
t
=
H
j
k
y
t
+
v
t
,
a
a
a
a
a
a
a
a
a
a
a
a
a
a
i
a
a
i
a
a
∀
j
∈
1,3
,where y is the state vector; F
j
(
t
)
=
F
[
t
,
m
j
(
t
)
] is the state transition matrix of model m
j at time t; w is the input white noise, w
∈
N
(
0
,
Q
j
); G
j is the noise correlation matrix of model m
j; z is the observation vector; H
j is the observation matrix of model m
j; v is the observation white noise. In this paper, the distortion of historical data is excluded, and H
j is an identity matrix and v is the observation noise v
∈
N
(
0
,
Q
j
). Both vectors and matrices should be extended to the same dimensions to conduct the filter and interaction process.


### 4.2. Implementation of IMM Algorithm

Assuming, at timet
-
1, the filtered state vector y
^
i
(
t
-
1
∣
t
-
1
), covariance matrix P
i
(
t
-
1
∣
t
-
1
) and model probability vector μ
i
(
t
-
1
) are provided.  π
i
j denotes the transition probability from model i to model j, i
,
j
∈
[
1,3
]. IMM algorithm can be expressed as follows.Step 1 (model-conditional reinitialization).
Consider the following:(8)
c
-
j
=
∑
i
=
1
3
π
i
j
μ
i
t
-
1
,
μ
i
j
(
t
-
1
∣
t
-
1
)
=
1
c
-
j
π
i
j
μ
i
t
-
1
,
y
^
^
j
t
-
1
∣
t
-
1
=
∑
i
=
1
3
y
^
i
(
t
-
1
∣
t
-
1
)
μ
i
j
(
t
-
1
∣
t
-
1
)
,
P
^
j
t
-
1
∣
t
-
1
=
∑
i
=
1
3
P
i
t
-
1
∣
t
-
1
y
^
i
t
-
1
∣
t
-
1
-
y
^
^
j
t
-
1
∣
t
-
1
T
kkkkkk
+
y
^
i
t
-
1
∣
t
-
1
-
y
^
^
j
t
-
1
∣
t
-
1
kkkkkk
·
y
^
i
t
-
1
∣
t
-
1
-
y
^
^
j
t
-
1
∣
t
-
1
T
·
μ
i
j
t
-
1
∣
t
-
1
,where y
^
^
j
(
t
-
1
∣
t
-
1
) is the mixed reinitialized state vector at time t
-
1, P
^
j
(
t
-
1
∣
t
-
1
) is the reinitialized covariance at time t
-
1, y
^
j
t
-
1
∣
t
-
1 is the filtered state vector at time t
-
1, μ
i
j
(
t
-
1
∣
t
-
1
) is the mixed probability at time interval t
-
1, and c
-
j is the normalized constant for model j.Step 2 (model-conditional filtering).
Consider the following:(9)
y
^
j
t
∣
t
-
1
=
F
j
t
-
1
y
^
^
j
t
-
1
∣
t
-
1
,
P
j
t
∣
t
-
1
=
F
j
t
-
1
P
^
j
t
-
1
∣
t
-
1
F
j
t
-
1
T
+
G
j
t
-
1
Q
j
t
-
1
G
j
t
-
1
T
.
The prediction residual is(10)
Z
~
j
t
=
Z
t
-
H
j
t
y
^
j
t
∣
t
-
1
.
The covariance matrix of residual is(11)
S
j
t
=
H
j
t
P
j
t
∣
t
-
1
H
j
t
T
+
Q
j
t
,where y
^
j
(
t
∣
t
-
1
), P
j
(
t
∣
t
-
1
) are the predicted state vector and covariance matrix for model j, Z
~
j
(
t
) is the prediction residual, and S
j
(
t
) is the covariance matrix of residual.
The filtering gain, state estimation update, and covariance matrix of state estimation update error are calculated as follows.
Kalman filtering gainK
j
(
t
)is (12)
K
j
t
=
P
j
t
∣
t
-
1
H
j
t
T
S
j
t
-
1
.
State estimation updates are(13)
y
^
j
t
∣
t
=
y
^
j
t
∣
t
-
1
+
K
j
t
Z
~
j
t
.
Covariance matrix is(14)
P
j
t
∣
t
=
P
j
t
∣
t
-
1
-
K
j
t
S
j
(
t
)
K
j
t
T
,where K
j
t is the Kalman filtering gain and y
^
j
(
t
∣
t
) and P
j
(
t
∣
t
) are the updated state vector and covariance matrix.Step 3 (probability updating).
The likelihood functionΛ
j
(
t
) is calculated under Gauss hypothesis (the probability density functions of white noises follow Gaussian distributions) [22]:(15)
Λ
j
t
=
2
π
S
j
t
-
1
/
2
exp
⁡
⁡
-
1
2
Z
~
j
t
T
S
j
t
-
1
Z
~
j
t
.
Model probability update is(16)
c
=
∑
j
=
1
3
Λ
j
t
c
-
j
,
μ
j
t
=
1
c
Λ
j
t
c
-
j
,where Λ
j
(
t
) is the likelihood function, μ
j
(
t
) is the updated model probability vector, and c is the updated normalized constant.Step 4 (hybrid output).
Hybrid prediction is given as(17)
y
^
IMM
t
∣
t
=
∑
j
=
1
3
y
^
j
t
∣
t
μ
j
t
.
Estimation covariance matrix is(18)
P
IMM
t
∣
t
=
∑
j
=
1
3
P
j
t
∣
t
+
y
^
IMM
t
∣
t
-
y
^
j
t
∣
t
y
^
IMM
t
∣
t
-
y
^
j
t
∣
t
T
k
k
k
k
k
k
·
y
^
IMM
t
∣
t
-
y
^
j
t
∣
t
T
μ
j
t
.
The hybrid predictiony
IMM is the probability-weighted sum of filtered predictions from all time series models. From the recursive process of IMM algorithm, we conclude that IMM algorithm is applicable to combine several basic models in real time.


### 4.3. Performance Evaluation of Hybrid Model

Figure3 presents the prediction for a typical one-week sample from November 18 to November 24, 2013, using the IMM based hybrid model. The forecasting result indicates that the hybrid model eliminates the prediction lag and provides relative accurate predictions for bus passenger demand. No matter on weekday or weekend, peak period or off-peak period, hybrid model perfectly tracks the tendency of passenger demand. On one hand, hybrid model captures most features of different time series. On the other hand, hybrid model synthesizes the advantages and eliminates the drawbacks of each submodel by applying the IMM filter algorithm.Figure 3
IMM forecast results for the source sample from November 18 to November 24, 2013.It was observed that predictions in some AM peak periods (red circles) deviate from the observations as opposed to the PM peak. This is possibly due to the influence of particular traffic event. Although IMM algorithm enhances the accuracy of predictions in off-peak period, hybrid models do not perform well during the off-peak period (black circle). As the strategy of IMM based hybrid model is to choose the most accurate model for the prediction, the performance to some extent depends on submodels and is inevitably impacted by the poor performance during off-peak periods. Additionally, passenger demand in off-peak periods usually follows Poisson distribution and is more easily influenced by traffic incidents, leading to the volatility of passenger demand during the off-peak period, which is difficult to be captured by the statistical models.Figure4 reflects the degree that model predictions deviate from the actual passenger demand. Among all models, weekly model has the lowest fitting degree. Due to the prediction lags, both the weekly model and the daily model fail to provide satisfying predictions. By contrast, the 15 min model performs much better by adding the GARCH model. However, when the passenger demand is rather small, the predictions of 15 min model go negative, which is inconsistent with the actual situation (red circle). Comparing with single models, the IMM based hybrid model is the most ideal model for passenger demand forecasting. Hybrid model amends the prediction lags and negative values, and the predictions are basically consistent with the actual passenger demand. Performance of the hybrid model is similar to the 15 min model, indicating that the hybrid model relies more on the 15 min model.Figure 4
Comparison of forecasting performances of different models, (a) weekly model performance, (b) daily model performance, (c) 15 min model performance, and (d) hybrid model performance.
(a)
(b)
(c)
(d)Table3 presents the mean absolute error (MAE), root mean square error (RMSE), MAPE, and VAPE of each prediction model. MAE and RMSE represent the accuracy of prediction while MAPE and VAPE represent the robustness of models.Table 3
Comparison of prediction performance of weekly, daily, 15 min, and hybrid models.
Model type
MAE
RMSE
MAPE %
VAPE %
Weekly
51.694
88.728
23.205
23.320
Daily
37.263
77.343
12.423
17.217
15 min
30.472
68.644
14.835
17.433
Hybrid
27.657
50.937
9.084
12.455It is identified that the forecasting effect of IMM based hybrid model is superior to the single models, including prediction accuracy and robustness. The MAE, RMSE, MAPE, and VAPE of hybrid model decline by 9.2%, 25.8%, 14.2%, and 28.6%, respectively, compared to the 15 min model, which has the best performance within all single models.


## 4.1. State Space Model

In order to input the predictions into hybrid system, the weekly, daily, and 15 min models should be adopted to space station models. DefiningM
=
{
m
1
,
m
2
,
m
3
} as the model set of hybrid system, the state space model is written as(7)
y
t
+
1
=
F
j
t
y
t
+
G
j
t
w
t
,
Z
t
=
H
j
k
y
t
+
v
t
,
a
a
a
a
a
a
a
a
a
a
a
a
a
a
i
a
a
i
a
a
∀
j
∈
1,3
,where y is the state vector; F
j
(
t
)
=
F
[
t
,
m
j
(
t
)
] is the state transition matrix of model m
j at time t; w is the input white noise, w
∈
N
(
0
,
Q
j
); G
j is the noise correlation matrix of model m
j; z is the observation vector; H
j is the observation matrix of model m
j; v is the observation white noise. In this paper, the distortion of historical data is excluded, and H
j is an identity matrix and v is the observation noise v
∈
N
(
0
,
Q
j
). Both vectors and matrices should be extended to the same dimensions to conduct the filter and interaction process.


## 4.2. Implementation of IMM Algorithm

Assuming, at timet
-
1, the filtered state vector y
^
i
(
t
-
1
∣
t
-
1
), covariance matrix P
i
(
t
-
1
∣
t
-
1
) and model probability vector μ
i
(
t
-
1
) are provided.  π
i
j denotes the transition probability from model i to model j, i
,
j
∈
[
1,3
]. IMM algorithm can be expressed as follows.Step 1 (model-conditional reinitialization).
Consider the following:(8)
c
-
j
=
∑
i
=
1
3
π
i
j
μ
i
t
-
1
,
μ
i
j
(
t
-
1
∣
t
-
1
)
=
1
c
-
j
π
i
j
μ
i
t
-
1
,
y
^
^
j
t
-
1
∣
t
-
1
=
∑
i
=
1
3
y
^
i
(
t
-
1
∣
t
-
1
)
μ
i
j
(
t
-
1
∣
t
-
1
)
,
P
^
j
t
-
1
∣
t
-
1
=
∑
i
=
1
3
P
i
t
-
1
∣
t
-
1
y
^
i
t
-
1
∣
t
-
1
-
y
^
^
j
t
-
1
∣
t
-
1
T
kkkkkk
+
y
^
i
t
-
1
∣
t
-
1
-
y
^
^
j
t
-
1
∣
t
-
1
kkkkkk
·
y
^
i
t
-
1
∣
t
-
1
-
y
^
^
j
t
-
1
∣
t
-
1
T
·
μ
i
j
t
-
1
∣
t
-
1
,where y
^
^
j
(
t
-
1
∣
t
-
1
) is the mixed reinitialized state vector at time t
-
1, P
^
j
(
t
-
1
∣
t
-
1
) is the reinitialized covariance at time t
-
1, y
^
j
t
-
1
∣
t
-
1 is the filtered state vector at time t
-
1, μ
i
j
(
t
-
1
∣
t
-
1
) is the mixed probability at time interval t
-
1, and c
-
j is the normalized constant for model j.Step 2 (model-conditional filtering).
Consider the following:(9)
y
^
j
t
∣
t
-
1
=
F
j
t
-
1
y
^
^
j
t
-
1
∣
t
-
1
,
P
j
t
∣
t
-
1
=
F
j
t
-
1
P
^
j
t
-
1
∣
t
-
1
F
j
t
-
1
T
+
G
j
t
-
1
Q
j
t
-
1
G
j
t
-
1
T
.
The prediction residual is(10)
Z
~
j
t
=
Z
t
-
H
j
t
y
^
j
t
∣
t
-
1
.
The covariance matrix of residual is(11)
S
j
t
=
H
j
t
P
j
t
∣
t
-
1
H
j
t
T
+
Q
j
t
,where y
^
j
(
t
∣
t
-
1
), P
j
(
t
∣
t
-
1
) are the predicted state vector and covariance matrix for model j, Z
~
j
(
t
) is the prediction residual, and S
j
(
t
) is the covariance matrix of residual.
The filtering gain, state estimation update, and covariance matrix of state estimation update error are calculated as follows.
Kalman filtering gainK
j
(
t
)is (12)
K
j
t
=
P
j
t
∣
t
-
1
H
j
t
T
S
j
t
-
1
.
State estimation updates are(13)
y
^
j
t
∣
t
=
y
^
j
t
∣
t
-
1
+
K
j
t
Z
~
j
t
.
Covariance matrix is(14)
P
j
t
∣
t
=
P
j
t
∣
t
-
1
-
K
j
t
S
j
(
t
)
K
j
t
T
,where K
j
t is the Kalman filtering gain and y
^
j
(
t
∣
t
) and P
j
(
t
∣
t
) are the updated state vector and covariance matrix.Step 3 (probability updating).
The likelihood functionΛ
j
(
t
) is calculated under Gauss hypothesis (the probability density functions of white noises follow Gaussian distributions) [22]:(15)
Λ
j
t
=
2
π
S
j
t
-
1
/
2
exp
⁡
⁡
-
1
2
Z
~
j
t
T
S
j
t
-
1
Z
~
j
t
.
Model probability update is(16)
c
=
∑
j
=
1
3
Λ
j
t
c
-
j
,
μ
j
t
=
1
c
Λ
j
t
c
-
j
,where Λ
j
(
t
) is the likelihood function, μ
j
(
t
) is the updated model probability vector, and c is the updated normalized constant.Step 4 (hybrid output).
Hybrid prediction is given as(17)
y
^
IMM
t
∣
t
=
∑
j
=
1
3
y
^
j
t
∣
t
μ
j
t
.
Estimation covariance matrix is(18)
P
IMM
t
∣
t
=
∑
j
=
1
3
P
j
t
∣
t
+
y
^
IMM
t
∣
t
-
y
^
j
t
∣
t
y
^
IMM
t
∣
t
-
y
^
j
t
∣
t
T
k
k
k
k
k
k
·
y
^
IMM
t
∣
t
-
y
^
j
t
∣
t
T
μ
j
t
.
The hybrid predictiony
IMM is the probability-weighted sum of filtered predictions from all time series models. From the recursive process of IMM algorithm, we conclude that IMM algorithm is applicable to combine several basic models in real time.


## 4.3. Performance Evaluation of Hybrid Model

Figure3 presents the prediction for a typical one-week sample from November 18 to November 24, 2013, using the IMM based hybrid model. The forecasting result indicates that the hybrid model eliminates the prediction lag and provides relative accurate predictions for bus passenger demand. No matter on weekday or weekend, peak period or off-peak period, hybrid model perfectly tracks the tendency of passenger demand. On one hand, hybrid model captures most features of different time series. On the other hand, hybrid model synthesizes the advantages and eliminates the drawbacks of each submodel by applying the IMM filter algorithm.Figure 3
IMM forecast results for the source sample from November 18 to November 24, 2013.It was observed that predictions in some AM peak periods (red circles) deviate from the observations as opposed to the PM peak. This is possibly due to the influence of particular traffic event. Although IMM algorithm enhances the accuracy of predictions in off-peak period, hybrid models do not perform well during the off-peak period (black circle). As the strategy of IMM based hybrid model is to choose the most accurate model for the prediction, the performance to some extent depends on submodels and is inevitably impacted by the poor performance during off-peak periods. Additionally, passenger demand in off-peak periods usually follows Poisson distribution and is more easily influenced by traffic incidents, leading to the volatility of passenger demand during the off-peak period, which is difficult to be captured by the statistical models.Figure4 reflects the degree that model predictions deviate from the actual passenger demand. Among all models, weekly model has the lowest fitting degree. Due to the prediction lags, both the weekly model and the daily model fail to provide satisfying predictions. By contrast, the 15 min model performs much better by adding the GARCH model. However, when the passenger demand is rather small, the predictions of 15 min model go negative, which is inconsistent with the actual situation (red circle). Comparing with single models, the IMM based hybrid model is the most ideal model for passenger demand forecasting. Hybrid model amends the prediction lags and negative values, and the predictions are basically consistent with the actual passenger demand. Performance of the hybrid model is similar to the 15 min model, indicating that the hybrid model relies more on the 15 min model.Figure 4
Comparison of forecasting performances of different models, (a) weekly model performance, (b) daily model performance, (c) 15 min model performance, and (d) hybrid model performance.
(a)
(b)
(c)
(d)Table3 presents the mean absolute error (MAE), root mean square error (RMSE), MAPE, and VAPE of each prediction model. MAE and RMSE represent the accuracy of prediction while MAPE and VAPE represent the robustness of models.Table 3
Comparison of prediction performance of weekly, daily, 15 min, and hybrid models.
Model type
MAE
RMSE
MAPE %
VAPE %
Weekly
51.694
88.728
23.205
23.320
Daily
37.263
77.343
12.423
17.217
15 min
30.472
68.644
14.835
17.433
Hybrid
27.657
50.937
9.084
12.455It is identified that the forecasting effect of IMM based hybrid model is superior to the single models, including prediction accuracy and robustness. The MAE, RMSE, MAPE, and VAPE of hybrid model decline by 9.2%, 25.8%, 14.2%, and 28.6%, respectively, compared to the 15 min model, which has the best performance within all single models.


## 5. Conclusions and Recommendations

Accurate passenger demand prediction is the fundamental of real-time bus scheduling and has important implication in improving bus service reliability. The lack of studies in short-term bus passenger demand forecast and the significance to incorporate real-time data into prediction models have motivated the development of an effective method for short-term bus passenger demand prediction. This paper takes Route 54 in Shenzhen, China, as a case study, aiming to construct a hybrid model based on the IMM filter algorithm to predict short-term bus passenger demand. Characteristics of bus passenger demand were extracted from historical data. After correlation analysis, three time series models named weekly, daily and 15 min were constructed. Stationarity, periodicity, and volatility of time series were investigated to decide appropriate prediction models. The corresponding prediction models ARMA, SARIMA, and ARIMA were developed, specific to capture different features of time series. In particular, the heteroscedasticity of nonstationary time series is further tested to capture the fluctuation clustering effect and the GARCH model is applied to improve the accuracy of ARIMA model prediction. The predictions of each single model are combined using an IMM algorithm aiming at maximizing the advantages of single models and optimizing the interaction between them. The core idea of the IMM algorithm is to estimate the priory optimized combinations of prediction models dynamically using real-time data and filter the predictions. Probabilistic transfer matrices are applied to produce interaction between different models, and the submodel predictions are amended by Kalman filter. Based on the performance evaluation, the proposed hybrid model provides both accurate and robust passenger demand predictions compared to the single prediction model. The hybrid model makes effective use of the historical and real-time information showing a better explanatory power than the alternatives.The innovations of this paper are as follows.(i)
First, the IMM filter algorithm is applied to a shorter time interval (15 min) compared to the former research, as the 15 min is the maximum departing interval in off-peak periods, and the predictions are more constructive to bus scheduling.
(ii)
Second, shorter interval aggregation time series tend to have more complicated statistical properties (nonlinearity and nonstationary), increasing the modeling difficulties. The performance of hybrid model is inevitably impacted by the performance of single models. This paper studies the features showed by different time series and then chooses the optimal models, improving the prediction accuracy of single models.
(iii)
Third, heteroscedasticity of passenger demand data is considered because of the fluctuation clustering effect of passenger demand in off-peak periods. Moreover, the GARCH model is developed to capture the heteroscedasticity of nonstationary time series and creatively imported into the IMM filter algorithm, intending to improve prediction accuracy of hybrid model during off-peak periods.Future studies could be conducted to improve the performance and practicality of hybrid model. First, the hybrid model may be considered to extend to a much shorter term (e.g., 5 min and 3 min) and the probabilistic transfer matrixes may be updated dynamically. As a follow-up study, the impacts of particular weather and traffic incidents which may cause heteroscedasticity of demand data should be considered. To this end, the challenge becomes to detect the particular incident in real time and then update the probabilistic transfer matrix based on current situations instead of applying the historical calibrated one. Secondly, for the prediction lags generated by ARMA model, lag corrector may be incorporated to amend ARMA model predictions. Finally, the proposed approach may be potentially extended to other short-term time series forecast applications as well, such as traffic flow and travel time prediction.



---

*Source: 682390-2015-04-21.xml*