Journal of Advanced Transportation

Volume 2019, Article ID 8943291, 14 pages

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

## Mass Rapid Transit System Passenger Traffic Forecast Using a Re-Sample Recurrent Neural Network

^{1}Fujian Province Key Laboratory of Automotive Electronics and Electric Drive, Fujian University of Technology, Fuzhou 350118, China^{2}Dept. of Civil and Architectural Engineering and Mechanics, The University of Arizona, Tucson, AZ 85721, USA^{3}School of Transportation, Fujian University of Technology, Fuzhou 350108, China^{4}Computer Science and Technology, Fujian University of Technology, Fuzhou 350108, China

Correspondence should be addressed to Yi-Chang Chiu; moc.liamg@gamlac

Received 4 December 2018; Revised 5 March 2019; Accepted 31 March 2019; Published 12 May 2019

Academic Editor: Guohui Zhang

Copyright © 2019 Rong Hu et al. 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

In this study, we developed a model re-sample Recurrent Neural Network (RRNN) to forecast passenger traffic on Mass Rapid Transit Systems (MRT). The Recurrent Neural Network was applied to build a model to perform passenger traffic prediction, where the forecast task was transformed into a classification task. However, in this process, the training dataset usually ended up being imbalanced. To address this dataset imbalance, our research proposes re-sample Recurrent Neural Network. A case study of the California Mass Rapid Transit System revealed that the model introduced in this work could timely and effectively predict passenger traffic of MRT. The measurements of passenger traffic themselves were also studied and showed that the new method provided a good understanding of the level of passenger traffic and was able to achieve prediction accuracy upwards of 90% higher than standard tests. The development of this model adds value to the methodology of traffic applications by employing these Recurrent Neural Networks.

#### 1. Introduction

Traffic congestion is a serious problem encountered in the implementation of MRT (Mass Rapid Transit) Systems. Delays can seriously affect people’s quality of life and urban development, while overcrowding remains a top source of customer dissatisfaction. As the number of passengers choosing to use MRT as their major mode of transportation continues to increase, overcrowding during peak hours has become a common occurrence when ridership exceeds the capacity of the train. For this reason, it is very important to distribute congestion information to the public timely, such that they are able to rearrange their plans or departure time accordingly in order to avoid congestion. On the other hand, subway operators can also explore effective approaches to solving this congestion. They can create more standing room by removing seats in their existing fleets and can add additional train cars to allow them to run longer trains during peak periods. They can also consider adding enhanced traction power and train control systems, as well as rail car storage space.

The increasing availability of data from system operators has created unique opportunities to predict congestion [1]. Predicting the crowdedness of a Rapid Transit System benefits the train operators and the public. Most existing work on predicting traffic has focused on predicting crowd flows [2–4]. For instance, Sun et al. [2] selected nonparametric regression as a prediction method to forecast pedestrian congestion. Zhang et al. [3] developed a real-time system based on Microsoft Azure Cloud to monitor and forecast crowd flow. Nicholas G. Polson et al. [4] developed a deep learning model to capture nonlinear, spatiotemporal effects and show how deep learning can provide precise, short-term traffic flow predictions. There are also other works that have focused on predicting traffic congestion, such as Min et al. [5], which proposed an adaptive, data-driven, real-time congestion prediction method which employed an adaptive K-means clustering method to identify different traffic patterns. Ma et al. [6] extended deep learning theory into large-scale transportation. They utilized a deep Restricted Bolzmann Machine and Recurrent Neural Network architecture to model and predict traffic congestion evolution based on Global Positioning System (GPS) data from taxi. Deep Neural Networks can capture the nonlinearity of history data but are limited by the imbalance of the data which is a common phenomenon in the real world. In particular for the data-driven methods, the accuracy of their traffic pattern recognition is low due to data imbalance. In our previous work [7], we presented re-sample Deep Neural Networks for congestion prediction. Although it reported a nice forecasting result, it still has some room to improve in predicting. In this work, we employ deep learning Recurrent Neural Networks in our model to predict the passenger traffic of MRT. Passenger traffic is studied and indicated by several patterns according to congested level. As previously mentioned, the history data utilized is imbalanced, as the majority of the data implies normal conditions with little to no congestion. Only a very small fraction of the data shows severe congestion occurring during the peak times. If we use a deep learning model to represent this tremendously imbalanced data, it would always be overfitted by the large amount of normal data and fail to establish a good generalization on the unseen severe congestion data. Thus, it cannot predict the true congestion level in a timely manner. In order to solve this problem, we propose re-sample Recurrent Neural Network Model (RRNN) to effectively predict congestion levels. We use the traffic data from the Rapid Transit System of San Francisco in the US as a case study. These experiments show that the model’s predictions were able to achieve an accuracy of more than 90% within 20 minutes.

The remainder of this paper is organized as follows: related works and literature review are given and discussed in Section 2. The definition of congestion level and a description of the data structure are introduced in Section 3. Section 4 discusses the modular re-sample Recurrent Neural Network used to predict passenger traffic patterns. We evaluate our results in Section 5 and summarize our research in relation to prior works in Section 6.

#### 2. Literature Review

The Rapid Transit, or urban metro, System has been an extremely important component in urban infrastructures [8–10] and plays an essential role in the development of cities. According to statistics and prior studies, there are about 213 cities around the world that have deployed MRT Systems since the first line opened in 1863 in London [11]. On the one hand, MRT provides a certain level of convenience for people, but on the other hand, the crowdedness of MRT as a whole results in delays and heavily affects people’s day-to-day lives. This crowdedness is always more commonplace during peak hours, when people are heading to or from work. This phenomenon has sparked a large amount of research focused on investigating this issue of overcrowding [12, 13]. In addition to this, many research efforts have also been made in predicting passenger flow [14, 15]. For example, [15] proposes a multipattern deep fusion technique constructed by fusing deep belief networks. For each different pattern, a DBN is developed as a deep representation for passenger flow. This process ends up making the model much more complex. Some works focus on short-term metro passenger flow using parametric [16] and nonparametric techniques [17]. Generally, the application of parametric methods has some limitations because of a linear assumption within time lagged variables. Unlike the parametric models, nonparametric ones construct a nonlinear relationship between input and output without any prior knowledge. Some hybrid models integrating both parametric and nonparametric methods are designed to improve prediction accuracy [18, 19]. These models focus on short-term passenger flow prediction.

Our work will mainly focus on studying passenger flow pattern especially for congestion level prediction. Timely and accurate recognition of congestion can lower the negative impacts on a MTR (Mass Rapid Transit) System [20]. In order to more accurately describe traffic conditions, many scholars apply networks and fuzzy theories including the FCM algorithm, ANN algorithm, and DS-ANN algorithm [21].

Machine learning has also been widely applied and has shown considerable success in traffic pattern recognition [22]. Chen [23] used shallow neural networks for traffic applications. They applied a dynamic neural network with a single-hidden layer which used a Gaussian basis function as an activation unit. Zheng et al. [24] deployed multiple single-hidden layer networks to predict traffic within the next fifteen-minute time span. In their work, they used both a tanh activation and a Gaussian radial basis function. Cetiner [25] proposed a neural network model using the day of the week and the time of day as inputs. Lv et al. [17] demonstrated that deep learning can be effectively used for traffic forecasting. A stacked auto-encoder was applied to recognize spatiotemporal patterns in the traffic data. Zhao et al. [26] proposed a LSTM network to forecast traffic by considering spatiotemporal correlations in traffic systems via a two-dimensional network.

Although some efforts have been made to model spatiotemporal characteristic traffic flows in prior studies [4, 26], there have been no efforts to predict the passenger traffic patterns of MRT in a timely manner. Basically, deep learning allows us to design flexible network structures with multiple layers, and as such models built on deep learning perform better than traditional Neural Network Models. In recent years, deep learning has become a very popular technology, especially in dealing with image recognition and natural language processing [27]. A Recurrent Neural Network (RNN) is a type of deep learning module that has been applied to a wide range of applications including speech recognition [28] and text generation [29]. Some prior studies have also tried to use a RNN model for traffic accident prediction [30].

This work develops a re-sample RNN model to predict the passenger traffic patterns of MRT along with the spatiotemporal structure of passenger trip data. Generally, this training data is imbalanced due to congestion that only occurs during the peak period. However, the other 90% of the time it is seat available, without any congestion. If this kind of dataset is directly used as input data to train the model, it is highly likely that it overfits for major patterns such as no congestion and fails to display a good representation of minor patterns like congestion, which are typically what researchers are interested in. In order to solve this problem, we propose a re-sample Recurrent Neural Network referred to as RRNN.

#### 3. Description of the Data Structure and Passenger Traffic Patterns Definition

In this study, we focus on the MRT of San Francisco in the US. The dataset contains days ranging from January 1, 2017, to November 30, 2017. The data consists of three categories of variables: demand, supply, and day attributes. After testing numerous variables, 45 variables were included in the final model, categorized into three types. The first type is demand variables that include average segment passenger loads for the previous 28 days and events deemed likely to generate high demand. The second type is supply-related variables that include scheduled capacity and unscheduled capacity at each time interval of interest and schedule type. Scheduled capacity can be calculated through the train timetable of the operator of the MTR. The unscheduled capacity is estimated when the unscheduled trains are dispatched. The third type consists of a period, day of the week, month, week of the month, day type, raining day, and event indicator variables. Event indicators are identified by a list of special events, such as sporting events or entertainment events recorded by the operator of the MTR. The schedule and location of events are assumed to be known in advance. Each period is defined to be 20 minutes for the modeling process. The operating hours is from 4:00 am to midnight on weekdays, from 6:00 am to midnight on Saturday, and from 8:00 am to midnight on Sunday. The whole system every week has 7 days 60 time segments 92 links, and the number of rides in every segment in every station is recorded by operator. The output is the predicting result: severe, moderate, light, and normal. The training data includes 70% of the entire dataset, which translates to around 9 months of history data. The 2 remaining months of data are used as testing data. In total, the dataset consists of 833520 data samples. The output and input variable structure is listed in the Appendix.

According to common understanding, passenger traffic patterns are designed according to congestion level which is defined as the average amount of passengers per train car. According to this work, given 40 seats are available per car on MRT, the passenger traffic patterns are defined as 4 different patterns: congested, moderate, light, and normal, which are separated by three respective cutoff points: 120, 80, and 40. As such, if the number of passengers per car is less than 40, then congestion is normal, between 40 and 80 is light, between 80 and 120 is moderate, and over 120 is congested.

#### 4. Module

Recurrent Neural Networks (RNNs) are neural networks with internal connections between hidden neurons and specifically designed feedback connections. The premise of this design is that human beings do not start their thought process from scratch. The human mind has the ability to associate previous information with current events, a phenomenon called persistence of memory. However, traditional neural networks are unable to replicate this and end up ignoring previous information. Using a movie scene classifier as an example, a traditional neural network cannot utilize any previous scenes to predict the current one.

In contrast with traditional neural network, RNNs are networks with a loop that allows the network to retain that prior information. An RNN introduces a transition weight W to transfer information between time slots. RNNs process sequential input data once and update a vector state that contains past information about past events in the sequence. A neural network that takes input as a value of X(t) and then outputs a value Y(t) is shown in Figure 1 [31].