# An Intelligent Time-Series Model for Forecasting Bus Passengers Based on Smartcard Data
## 3 Proposed Model  
Passenger flow forecasting is a nonlinear, nonstationary time series problem, and a good forecast result mainly depends on having a large amount of high-quality data and a large number of methods. Nowadays, there are many passenger flow forecast models; however, some issues can be improved to enhance performance, such as:  
1. Passenger flow forecasting is a periodic pattern, and many forecast models have been proposed to address this pattern. Previous studies have shown that datasets of no more than one month can be used to predict passenger flow at intervals of 5 or 15 min, and some studies use longer time datasets to predict passenger flow, such as daily or weekly intervals. To avoid the impact of extreme passenger flow, some studies do not consider the data collected on national holidays or weekends, and some studies treat special data as another forecast model for separate training. There is some room for improvement to obtain satisfactory results. 2. To solve the shortcomings of the model, more and more studies are taking advantage of different methods that complement each other and proposing hybrid models to forecast passenger flow. These hybrid models mainly combine traditional algorithmsand neural networks, but their nature still has limitations. Hence, hybrid models can be further strengthened to obtain the dynamics and forecasts of passenger flow. 3. Most research in this area has focused on passenger flow forecasting for railways, high-speed railways, and subways. Compared with other public transportation systems, there have been fewer studies forecasting bus passenger flow based on smartcard data, and few studies have considered time-series lag periods as forecast variables. 4. Previous research on the spatio-temporal nature of smartcard data has been widely conducted, and different attributes have been used in these studies; however, these studies have rarely discussed why these attributes have been selected and which attributes should be used in these methods. The selection and combination of input attributes is an important bridge between methods and forecast results. Based on the discussion above, current forecast models of bus passenger flow still have limitations in terms of attribute selection, methods, and public transportation models. To process these limitations, we propose an integrated-weight time-series model for forecasting bus passengers using smartcards. First, the proposed model considers the attributes of time, space, and the lag period and uses four intelligent forecast models (multilayer perceptron, support vector regression, RBF network, and LSTM network) to forecast passenger flow for different time series (weeks, weekdays, and holidays). Second, the forecast data from the top three of the 80 combined forecast models (8 lag periods \(\times\) 10 algorithms) were used as adaptive factors in the proposed model to enhance the forecast results. The proposed time series forecasting model was revised from adaptive expectations theory [40, 41]. Adaptive expectations theory is an economic theory that gives importance to past events when predicting future outcomes--a hypothetical process through which people can form expectations of what will happen in the future based on what has happened in the past. In a more complex and adaptive expectation model, different weights can be assigned to past values, and we can look at how different the fluctuations are from the predicted fluctuations. Computational steps  
The proposed procedure has five steps (see Figure 1). A detailed breakdown of the five steps is provided in the following sections. Step 1: Data collection  
In this step, two types of data were collected:  
1. One type was smartcard data from a bus industry in Kaohsiung City, Taiwan; the data were collected over a total of 669 days, including 2,865,763 records from January 2018 to October 2019, 17 bus lines (routes), and 137 bus stations. There were 42 attributes in the collected data (see Table 1), covering 15 administrative districts of Kaohsiung City in Taiwan.