# Passenger Flow Scale Prediction of Urban Rail Transit Stations Based on Multilayer Perceptron (MLP)

Authors: Luzhou Lin; Yuezhe Gao; Bingxin Cao; Zifan Wang; Cai Jia
Journal: Complexity
 (2023)

---

## Abstract

Accurately predicting passenger flow at rail stations is an effective way to reduce operation and maintenance costs, improve the quality of passenger travel while meeting future passenger travel demand. The improvement of data acquisition capability allows fine-grained and large-scale built environment data to be extracted. Therefore, this paper focuses on investigating the relationship between the built environment around the station and the station passenger flow and discusses whether the built environment data can be applied to the station passenger flow prediction. Firstly, the evaluation system of station passenger flow influencing factors is built based on multisource data. The inner relationship between built environment factors and station passenger flow is investigated using the Pearson correlation analysis. Based on this, a multilayer perceptron (MLP)-based passenger flow prediction model was developed to predict the passenger flow at key stations. The study results show that the built environment factors impact station passenger flow, and the MLP prediction model has better prediction accuracy and applicability. The results of the study can be applied to predict the passenger flow scale of rail stations without historical passenger flow data and thus are also applicable to new rail stations.


---

## Body

## 1. Introduction

With the rapid economic development, urban transportation demand is growing and motor vehicle ownership is increasing, but due to the limited urban construction area, the imbalance between transportation supply and demand can cause traffic congestion and safety problems in large cities, which reduces the quality of travel for residents. Big cities have chosen to vigorously develop rail transportation to solve the aforementioned problems.Urban rail transit has the shortcomings of high operation and maintenance costs and cannot be developed indefinitely. Usually, the passenger flow prediction work of existing stations utilizes the historical passenger flow data of existing stations. Once the nature of the land or population distribution around the station changes, the historical passenger flow data of the station does not play a decisive role in the future passenger flow scale prediction, so it is necessary to establish a direct relationship between built environment data and passenger flow. With the gradual maturity of the application of big data technology, the acquisition of refined and large-scale building attributes, population characteristics, and other data becomes possible, which provides new ideas for the station’s passenger flow prediction. Exploring the relationship between the built environment around the site and the passenger flow, and predicting the passenger flow of the site through the built environment data is the way to accurately grasp the scale of the site's passenger flow and maximize the reduction of operating costs.In recent years, researchers have conducted in-depth research on urban rail transit passenger flow prediction, mainly focusing on the analysis of rail transit station passenger flow influencing factors, rail transit station passenger flow prediction objectives, and methods.At present, the factors influencing rail passenger flow mainly focus on the following three aspects: population characteristics, transportation facilities, and location factors. The current status of passenger flow influencing factors research is shown in Table1.Table 1
Current status of research on factors influencing passenger flow.
Author
Country
Influencing factors
Blainey et al. [1]
UK
Demographic characteristics: population
Transportation facilities category: frequency of departures, parking space, and geographical distance
Gutiérrez et al. [2]
Spain
Transportation facilities category: station type, number of lines, and network accessibility
Demographic characteristics: population and employment characteristics
Locational factors: land use and street density
Pinedo et al. [3]
Spain
Location factors: number of commercial outlets around the station and spatial integration of the station
Transportation facilities category: number of lines, accessibility of the network, and transportation demand
Chiang et al. [4]
United States
Transportation facilities: fixed line passenger flow and fares
Demographic characteristics: population and resident income
Wu et al. [5]
China
Location factors: land use, socioeconomic, environment, and service levelIn the analysis of factors affecting rail traffic passenger flow, researchers have paid most attention to location factors, mainly focusing on land use and establishing weighted regression models of geographic factors through GIS technology, which is the current hotspot in the analysis of factors affecting rail passenger flow [6]. However, current studies rarely consider all three types of factors (demographic characteristics, transportation facility categories, and location factors) at the same time and usually consider only one or two of them, which cannot comprehensively reflect the reasons why passengers choose rail transportation to travel, leading to deviations in the prediction of station passenger flow.The accuracy of metro station passenger flow prediction determines the construction scale and internal structure of the station, which affects the operation of the station and the travel experience of passengers. At present, rail transit station passenger flow prediction methods mainly include the four-stage method and the direct prediction method [7].The four-stage method is a set-count prediction method consisting of the following four components: traffic generation, traffic distribution, traffic mode division, and traffic assignment, which was first proposed in the Chicago Regional Transportation Study and is one of the commonly used methods for passenger flow prediction at present [8]. However, this method counts and analyzes the traffic behavior of each traveler according to the traffic zone, and when applied to the more microscopic scenario of a rail station, it cannot accurately grasp the relationship between the built environment around the station and the passenger flow, and the prediction accuracy cannot be guaranteed [9], and the method itself does not have a high degree of accuracy, and very small errors are passed to the next step, which may cause greater deviations in the prediction results [10].The direct demand model (DDM) is a study that takes rail stations as the object, considers the economic and built environment around the station and other elements, and explores the quantitative relationship between them and the passenger flow to predict the future traffic scale. Compared with the four-stage method, DDM is simpler in operation and more accurate in prediction [11] and can be implemented by linear regression models [12], geographically weighted regression (GWR) [13], artificial neural networks (ANN) [14], and k-nearest neighbor (KNN) [15]. The linear regression model is a regression model that characterizes the correlation between variables through a linear functional relationship [16]. Currie et al. [17] conducted a linear regression analysis of the relationship between rail passenger flow and occupational density, car ownership, station level of service, and fares to establish a predictive model for rail passenger flow, and the results of the study showed that the station level of service is the main driver of passenger travel. GWR is a relatively microscopic spatial analysis method that can elucidate the local travel characteristics within the study area [18]. Cardozo et al. [19] used a geographically weighted regression model to predict inbound rail stations in Madrid and compared the prediction results with those of ordinary least squares (OLS) and found that GWR has a higher prediction accuracy than OLS, indicating that the spatial analysis technique can be applied as a direct prediction model in the prediction of passenger flow at rail stations. The k-nearest neighbor is a method that classifies every record in a dataset. Based on KNN, Bai et al. take the trend factor and time interval factor of passenger flow into consideration, to reduce the risk that the original method has fewer evaluation criteria in the matching process [20]. Multilayer perceptron (MLP), a commonly used artificial neural network with features such as adaptive and real-time learning, can be applied to traffic prediction [21–23]. Lin et al. [24] considered the spatial correlation between passenger flows from the perspective of single stations and the whole network, respectively. The prediction of metro passenger flow and bus passenger flow was performed using MLP.With the deepening of the metro network, the attributes of metro stations and the nature of the surrounding land are also changing, so there is an interaction between passenger flow and land use. Existing studies rarely explore in depth the degree of influence of different variables on station passenger flow, which may have an impact on the prediction accuracy with the change of land use nature. For new urban rail transit stations, once built, it is difficult to adjust the station scale and internal layout again. If the actual passenger flow of new stations is underestimated, it will lead to wasted construction costs and high operation and maintenance costs; if the actual passenger flow of new stations is overestimated, it will not meet the travel demand of surrounding passengers and cause station congestion, resulting in long passenger queuing time, lower passenger satisfaction, and poor service level. In addition, few studies can make more comprehensive forecasts of passenger flow from different time dimensions. Therefore, for rail operators to accurately predict the passenger flow scale of newly opened stations without historical data, a direct passenger flow prediction model with built environment data is needed. The main work of this paper is as follows:(i)
Obtaining data on the nature of land use, residential and working population, and the number of other transportation connections around the station, building an evaluation system of the station passenger flow impact factors, and analyzing the impact of each factor on the passenger flow of the rail transit station.(ii)
To build a multilayer perceptron-based passenger flow prediction model for rail transit stations, to predict the average daily passenger flow and peak hourly passenger flow of stations under two scenarios: weekdays and nonweekdays and to compare the prediction results of multiple regression models, k-nearest neighbor and radial base neural networks to analyze the prediction accuracy.The rest of the research in this paper is presented as follows: Section2 presents the data sources of this study and a correlation analysis of the factors influencing urban rail traffic. Section 3 develops a station prediction model based on a multilayer perceptron. Section 4 discusses the feasibility of the prediction model. Section 5 summarizes the contributions and limitations of this paper, as well as the outlook for future work.


## 2. Methodology

### 2.1. Influence Factor Selection

Combining the current status of domestic and international research, four guideline layers of land development intensity, station connectivity characteristics, station surrounding population characteristics, and other transportation connections are selected to explore the influence of each factor on station passenger flow through seven calculated indicators.


#### 2.1.1. Land Development Intensity

It is the ratio of the total area of building land to the area of a certain region. The higher the land development intensity of a certain region, the greater the attraction of the region to the population, and therefore the greater the passenger flow of the regional rail stations.


#### 2.1.2. Station Connectivity Characteristics

This refers to the degree of access a station has to the entire rail network. The commonly used indicators include median centrality, proximity to the center, the number of connected stations, etc. The number of connected stations refers to the number of other stations connected to a station. It is generally believed that the accessibility of interchange stations is higher than that of noninterchange stations because interchange stations can change lines and directions. Therefore, the passenger flow is generally higher than that of noninterchange stations.


#### 2.1.3. Population Characteristics around the Station

Population density and residential or working population density are mainly considered. The residential or working population density is a group of people with stable commuting needs who need to travel between two places during working days, which will generate a certain amount of rail traffic demand.


#### 2.1.4. Other Transportation Connections

The density of shared bicycle connections around the station and the density of bus stop connections around the station are mainly considered. It is generally believed that the more shared bikes or buses that stop within the acceptable walking range around the station, the more convenient it is for passengers; otherwise, passengers are likely to choose to get off at other metro stations with more convenient connections.


### 2.2. Prediction Model Based on Multilayer Perceptron

#### 2.2.1. Model Construction Ideas

The prediction objectives of the model are the average daily passenger flow of the station and the peak hourly passenger flow of the station, and the data content is shown in Table2. The independent variables are the built environment factors affecting passenger flow as the model’s input parameters, and the data content is shown in Table 3. Two hidden layers are set to build the prediction model of urban rail transit station passenger flow based on multilayer perceptron, and the model structure is shown in Figure 1. The built environment data and passenger flow of the whole station are used to train the model and predict the station passenger flow.Table 2
Model output data content.
Parameters
The data content
Y
1
Average daily passenger flow on working days
Y
2
Average daily passenger flow on nonworking days
Y
3
Peak hour passenger flow on working days
Y
4
Peak hour passenger flow on nonworking daysTable 3
Model input data content.
Parameters
The data content
X
1
Building density around the station
X
2
Number of connected stations
X
3
Population density around the station
X
4
Population density around the station
X
5
Working population density around the station
X
6
Connection density of shared bikes around the station
X
7
Bus connection density around the stationFigure 1
Prediction model of passenger flow of subway stations based on multilayer perceptron.


#### 2.2.2. Model Principle and Parameter Setting

The model has four layers: the input layer, hidden layer 1, hidden layer 2, and output layer, in which there are 9 neurons in the input layer and 1 neuron in the output layer, and the number of neurons in the hidden layer is calculated according to the empirical formula in (1), and the number of neurons in the hidden layer of the model is determined as 16.(1)p=2n+1,where p is the number of neurons in the hidden layer and n is the number of neurons in the input layer, which is calculated as 15 and is generally taken as an integer power of 2 according to experience, so the value is 16.The 7 neurons in the input layer correspond to 7 independent variables, and the input vector of themth orbit station is Xm = (xm1, xm2, xm3, xm4, xm5, xm6, xm7) with 288 sets of input vectors. The weight of the connection between the ith node in layer k−1 and the jth neuron in layer k is wijk, and the threshold of the ith neuron in layer k is bik. The model generates initialized weight values and thresholds for normal distribution, where the weight values are in the range (0, 1). ( a1(k−1), a2(k−1), a3(k−1), ..., a (k−1) ) is the output data of the k−1th layer in addition to the input layer, and the neurons of each layer are weighted to sum the data input from the previous layer, as shown in equation (2); then, the output is passed through the activation function, f denotes the activation function, and the activation function is generally set as a nonlinear function. The activation function is generally set as a nonlinear function, which can add a nonlinear transfer function to the model. In this paper, the Sigmoid function is chosen as the activation function, as shown in Equation (3), and ajk is the output of the jth neuron in the kth layer.(2)hjk=∑i=1nk−1∑j=1nkwijkajk−1+bik,(3)ajk=fhjk=11+e−hjk.The MLP model is usually trained using the error backpropagation (BP) algorithm for the weights and thresholds of each neuron in the model. The principle of the BP algorithm is to calculate the error of the output layer according to equation (4) and distribute the error backpropagation to all the neurons in each layer and iterate the thresholds and weights through (5) and (6). The operations given previously are repeated until the iteration is stopped when any of the following conditions are satisfied, at which time the result of the output layer is the final output result.Termination conditions are as follows:(1)
The training time exceeds 20 minutes(2)
The number of iterations exceeds 600(3)
The errorE of the training set is within 10%(4)E=1n∑i=1nyi−yi′2, where n is the number of samples, yi is the true value, and yi′ is the output of the MLP model.(5)b^ik=bik−η∂E∂bik,(6)w^ik=wik−η∂E∂wik, where bik and wik are the threshold and weight before correction; b^ik and w^ik are the threshold and weight after correction; η is the learning rate, taking values between (0, 1), and in this paper, we take η = 0.0001.


#### 2.2.3. Compare Model Parameter Settings

The MLP model is compared and analyzed with three benchmark models, RBF, KNN, and multiple linear regression, with the following parameter settings.The construction idea of RBF is similar to that of the MLP model, but only one hidden layer with 16 neurons is set, the radial basis function (RBF) is used for the transfer function, and the rest of the input and output layers are set in the same way as the MLP model.The hyperparameter n_neighbors of the KNN model is obtained by iterating through 1 to 10 to obtain the optimal value, and the Euclidean distance is used to calculate the intersample distance. The weight of the distance is expressed as the reciprocal to achieve the prediction of the target.The multiple linear regression model uses the principle of least squares to find the regression equation, and the regression equations for different scenarios are shown in Equations (7)–(10).For the workday scenario, when the forecast target is the average daily traffic,(7)y1=−29.758x1+8677.585x2−0.591x3+0.773x4+0.829x5+17.287x6+100.898x7−9248.278.For the weekday scenario, when the forecast target is peak hour traffic,(8)y2=−5.331x1+1186.902x2−0.121x3+0.142x4+0.172x5+3.009x6+12.962x7−1129.08.For nonworking day scenarios, when the forecast target is average daily traffic,(9)y3=−14.979x1+6467.953x2−0.379x3+0.511x4+0.425x5+7.332x6+78.286x7−4324.763.For nonworking day scenarios, when the forecast target is peak hour traffic,(10)y4=−1.224x1+539.343x2−0.04x3+0.048x4+0.045x5+0.705+6.166x7−243.087,where x1 is the building density around the site, x2 is the number of connected stations, x3 is the total population density around the site, x4 is the residential population density around the site, x5 is the working population density around the site, x6 is the shared bicycle connection density around the site, and x7 is the bus stop connection density around the site.


## 2.1. Influence Factor Selection

Combining the current status of domestic and international research, four guideline layers of land development intensity, station connectivity characteristics, station surrounding population characteristics, and other transportation connections are selected to explore the influence of each factor on station passenger flow through seven calculated indicators.


### 2.1.1. Land Development Intensity

It is the ratio of the total area of building land to the area of a certain region. The higher the land development intensity of a certain region, the greater the attraction of the region to the population, and therefore the greater the passenger flow of the regional rail stations.


### 2.1.2. Station Connectivity Characteristics

This refers to the degree of access a station has to the entire rail network. The commonly used indicators include median centrality, proximity to the center, the number of connected stations, etc. The number of connected stations refers to the number of other stations connected to a station. It is generally believed that the accessibility of interchange stations is higher than that of noninterchange stations because interchange stations can change lines and directions. Therefore, the passenger flow is generally higher than that of noninterchange stations.


### 2.1.3. Population Characteristics around the Station

Population density and residential or working population density are mainly considered. The residential or working population density is a group of people with stable commuting needs who need to travel between two places during working days, which will generate a certain amount of rail traffic demand.


### 2.1.4. Other Transportation Connections

The density of shared bicycle connections around the station and the density of bus stop connections around the station are mainly considered. It is generally believed that the more shared bikes or buses that stop within the acceptable walking range around the station, the more convenient it is for passengers; otherwise, passengers are likely to choose to get off at other metro stations with more convenient connections.


## 2.1.1. Land Development Intensity

It is the ratio of the total area of building land to the area of a certain region. The higher the land development intensity of a certain region, the greater the attraction of the region to the population, and therefore the greater the passenger flow of the regional rail stations.


## 2.1.2. Station Connectivity Characteristics

This refers to the degree of access a station has to the entire rail network. The commonly used indicators include median centrality, proximity to the center, the number of connected stations, etc. The number of connected stations refers to the number of other stations connected to a station. It is generally believed that the accessibility of interchange stations is higher than that of noninterchange stations because interchange stations can change lines and directions. Therefore, the passenger flow is generally higher than that of noninterchange stations.


## 2.1.3. Population Characteristics around the Station

Population density and residential or working population density are mainly considered. The residential or working population density is a group of people with stable commuting needs who need to travel between two places during working days, which will generate a certain amount of rail traffic demand.


## 2.1.4. Other Transportation Connections

The density of shared bicycle connections around the station and the density of bus stop connections around the station are mainly considered. It is generally believed that the more shared bikes or buses that stop within the acceptable walking range around the station, the more convenient it is for passengers; otherwise, passengers are likely to choose to get off at other metro stations with more convenient connections.


## 2.2. Prediction Model Based on Multilayer Perceptron

### 2.2.1. Model Construction Ideas

The prediction objectives of the model are the average daily passenger flow of the station and the peak hourly passenger flow of the station, and the data content is shown in Table2. The independent variables are the built environment factors affecting passenger flow as the model’s input parameters, and the data content is shown in Table 3. Two hidden layers are set to build the prediction model of urban rail transit station passenger flow based on multilayer perceptron, and the model structure is shown in Figure 1. The built environment data and passenger flow of the whole station are used to train the model and predict the station passenger flow.Table 2
Model output data content.
Parameters
The data content
Y
1
Average daily passenger flow on working days
Y
2
Average daily passenger flow on nonworking days
Y
3
Peak hour passenger flow on working days
Y
4
Peak hour passenger flow on nonworking daysTable 3
Model input data content.
Parameters
The data content
X
1
Building density around the station
X
2
Number of connected stations
X
3
Population density around the station
X
4
Population density around the station
X
5
Working population density around the station
X
6
Connection density of shared bikes around the station
X
7
Bus connection density around the stationFigure 1
Prediction model of passenger flow of subway stations based on multilayer perceptron.


### 2.2.2. Model Principle and Parameter Setting

The model has four layers: the input layer, hidden layer 1, hidden layer 2, and output layer, in which there are 9 neurons in the input layer and 1 neuron in the output layer, and the number of neurons in the hidden layer is calculated according to the empirical formula in (1), and the number of neurons in the hidden layer of the model is determined as 16.(1)p=2n+1,where p is the number of neurons in the hidden layer and n is the number of neurons in the input layer, which is calculated as 15 and is generally taken as an integer power of 2 according to experience, so the value is 16.The 7 neurons in the input layer correspond to 7 independent variables, and the input vector of themth orbit station is Xm = (xm1, xm2, xm3, xm4, xm5, xm6, xm7) with 288 sets of input vectors. The weight of the connection between the ith node in layer k−1 and the jth neuron in layer k is wijk, and the threshold of the ith neuron in layer k is bik. The model generates initialized weight values and thresholds for normal distribution, where the weight values are in the range (0, 1). ( a1(k−1), a2(k−1), a3(k−1), ..., a (k−1) ) is the output data of the k−1th layer in addition to the input layer, and the neurons of each layer are weighted to sum the data input from the previous layer, as shown in equation (2); then, the output is passed through the activation function, f denotes the activation function, and the activation function is generally set as a nonlinear function. The activation function is generally set as a nonlinear function, which can add a nonlinear transfer function to the model. In this paper, the Sigmoid function is chosen as the activation function, as shown in Equation (3), and ajk is the output of the jth neuron in the kth layer.(2)hjk=∑i=1nk−1∑j=1nkwijkajk−1+bik,(3)ajk=fhjk=11+e−hjk.The MLP model is usually trained using the error backpropagation (BP) algorithm for the weights and thresholds of each neuron in the model. The principle of the BP algorithm is to calculate the error of the output layer according to equation (4) and distribute the error backpropagation to all the neurons in each layer and iterate the thresholds and weights through (5) and (6). The operations given previously are repeated until the iteration is stopped when any of the following conditions are satisfied, at which time the result of the output layer is the final output result.Termination conditions are as follows:(1)
The training time exceeds 20 minutes(2)
The number of iterations exceeds 600(3)
The errorE of the training set is within 10%(4)E=1n∑i=1nyi−yi′2, where n is the number of samples, yi is the true value, and yi′ is the output of the MLP model.(5)b^ik=bik−η∂E∂bik,(6)w^ik=wik−η∂E∂wik, where bik and wik are the threshold and weight before correction; b^ik and w^ik are the threshold and weight after correction; η is the learning rate, taking values between (0, 1), and in this paper, we take η = 0.0001.


### 2.2.3. Compare Model Parameter Settings

The MLP model is compared and analyzed with three benchmark models, RBF, KNN, and multiple linear regression, with the following parameter settings.The construction idea of RBF is similar to that of the MLP model, but only one hidden layer with 16 neurons is set, the radial basis function (RBF) is used for the transfer function, and the rest of the input and output layers are set in the same way as the MLP model.The hyperparameter n_neighbors of the KNN model is obtained by iterating through 1 to 10 to obtain the optimal value, and the Euclidean distance is used to calculate the intersample distance. The weight of the distance is expressed as the reciprocal to achieve the prediction of the target.The multiple linear regression model uses the principle of least squares to find the regression equation, and the regression equations for different scenarios are shown in Equations (7)–(10).For the workday scenario, when the forecast target is the average daily traffic,(7)y1=−29.758x1+8677.585x2−0.591x3+0.773x4+0.829x5+17.287x6+100.898x7−9248.278.For the weekday scenario, when the forecast target is peak hour traffic,(8)y2=−5.331x1+1186.902x2−0.121x3+0.142x4+0.172x5+3.009x6+12.962x7−1129.08.For nonworking day scenarios, when the forecast target is average daily traffic,(9)y3=−14.979x1+6467.953x2−0.379x3+0.511x4+0.425x5+7.332x6+78.286x7−4324.763.For nonworking day scenarios, when the forecast target is peak hour traffic,(10)y4=−1.224x1+539.343x2−0.04x3+0.048x4+0.045x5+0.705+6.166x7−243.087,where x1 is the building density around the site, x2 is the number of connected stations, x3 is the total population density around the site, x4 is the residential population density around the site, x5 is the working population density around the site, x6 is the shared bicycle connection density around the site, and x7 is the bus stop connection density around the site.


## 2.2.1. Model Construction Ideas

The prediction objectives of the model are the average daily passenger flow of the station and the peak hourly passenger flow of the station, and the data content is shown in Table2. The independent variables are the built environment factors affecting passenger flow as the model’s input parameters, and the data content is shown in Table 3. Two hidden layers are set to build the prediction model of urban rail transit station passenger flow based on multilayer perceptron, and the model structure is shown in Figure 1. The built environment data and passenger flow of the whole station are used to train the model and predict the station passenger flow.Table 2
Model output data content.
Parameters
The data content
Y
1
Average daily passenger flow on working days
Y
2
Average daily passenger flow on nonworking days
Y
3
Peak hour passenger flow on working days
Y
4
Peak hour passenger flow on nonworking daysTable 3
Model input data content.
Parameters
The data content
X
1
Building density around the station
X
2
Number of connected stations
X
3
Population density around the station
X
4
Population density around the station
X
5
Working population density around the station
X
6
Connection density of shared bikes around the station
X
7
Bus connection density around the stationFigure 1
Prediction model of passenger flow of subway stations based on multilayer perceptron.


## 2.2.2. Model Principle and Parameter Setting

The model has four layers: the input layer, hidden layer 1, hidden layer 2, and output layer, in which there are 9 neurons in the input layer and 1 neuron in the output layer, and the number of neurons in the hidden layer is calculated according to the empirical formula in (1), and the number of neurons in the hidden layer of the model is determined as 16.(1)p=2n+1,where p is the number of neurons in the hidden layer and n is the number of neurons in the input layer, which is calculated as 15 and is generally taken as an integer power of 2 according to experience, so the value is 16.The 7 neurons in the input layer correspond to 7 independent variables, and the input vector of themth orbit station is Xm = (xm1, xm2, xm3, xm4, xm5, xm6, xm7) with 288 sets of input vectors. The weight of the connection between the ith node in layer k−1 and the jth neuron in layer k is wijk, and the threshold of the ith neuron in layer k is bik. The model generates initialized weight values and thresholds for normal distribution, where the weight values are in the range (0, 1). ( a1(k−1), a2(k−1), a3(k−1), ..., a (k−1) ) is the output data of the k−1th layer in addition to the input layer, and the neurons of each layer are weighted to sum the data input from the previous layer, as shown in equation (2); then, the output is passed through the activation function, f denotes the activation function, and the activation function is generally set as a nonlinear function. The activation function is generally set as a nonlinear function, which can add a nonlinear transfer function to the model. In this paper, the Sigmoid function is chosen as the activation function, as shown in Equation (3), and ajk is the output of the jth neuron in the kth layer.(2)hjk=∑i=1nk−1∑j=1nkwijkajk−1+bik,(3)ajk=fhjk=11+e−hjk.The MLP model is usually trained using the error backpropagation (BP) algorithm for the weights and thresholds of each neuron in the model. The principle of the BP algorithm is to calculate the error of the output layer according to equation (4) and distribute the error backpropagation to all the neurons in each layer and iterate the thresholds and weights through (5) and (6). The operations given previously are repeated until the iteration is stopped when any of the following conditions are satisfied, at which time the result of the output layer is the final output result.Termination conditions are as follows:(1)
The training time exceeds 20 minutes(2)
The number of iterations exceeds 600(3)
The errorE of the training set is within 10%(4)E=1n∑i=1nyi−yi′2, where n is the number of samples, yi is the true value, and yi′ is the output of the MLP model.(5)b^ik=bik−η∂E∂bik,(6)w^ik=wik−η∂E∂wik, where bik and wik are the threshold and weight before correction; b^ik and w^ik are the threshold and weight after correction; η is the learning rate, taking values between (0, 1), and in this paper, we take η = 0.0001.


## 2.2.3. Compare Model Parameter Settings

The MLP model is compared and analyzed with three benchmark models, RBF, KNN, and multiple linear regression, with the following parameter settings.The construction idea of RBF is similar to that of the MLP model, but only one hidden layer with 16 neurons is set, the radial basis function (RBF) is used for the transfer function, and the rest of the input and output layers are set in the same way as the MLP model.The hyperparameter n_neighbors of the KNN model is obtained by iterating through 1 to 10 to obtain the optimal value, and the Euclidean distance is used to calculate the intersample distance. The weight of the distance is expressed as the reciprocal to achieve the prediction of the target.The multiple linear regression model uses the principle of least squares to find the regression equation, and the regression equations for different scenarios are shown in Equations (7)–(10).For the workday scenario, when the forecast target is the average daily traffic,(7)y1=−29.758x1+8677.585x2−0.591x3+0.773x4+0.829x5+17.287x6+100.898x7−9248.278.For the weekday scenario, when the forecast target is peak hour traffic,(8)y2=−5.331x1+1186.902x2−0.121x3+0.142x4+0.172x5+3.009x6+12.962x7−1129.08.For nonworking day scenarios, when the forecast target is average daily traffic,(9)y3=−14.979x1+6467.953x2−0.379x3+0.511x4+0.425x5+7.332x6+78.286x7−4324.763.For nonworking day scenarios, when the forecast target is peak hour traffic,(10)y4=−1.224x1+539.343x2−0.04x3+0.048x4+0.045x5+0.705+6.166x7−243.087,where x1 is the building density around the site, x2 is the number of connected stations, x3 is the total population density around the site, x4 is the residential population density around the site, x5 is the working population density around the site, x6 is the shared bicycle connection density around the site, and x7 is the bus stop connection density around the site.


## 3. Beijing Metro Station Passenger Flow Forecast

The metro network in 2017 was selected as the study case, and 90% of the station sample data were randomly selected as the training set and 10% as the prediction set. The prediction target for each station can be derived from the independent variables of all stations in the prediction set. Each model is trained three times, and the one with the best training accuracy is selected as the prediction model. For the prediction results of individual stations, a few typical representative stations in the prediction set are selected for a detailed description.


### 3.1. Data Sources

#### 3.1.1. POI Data

Point of interest (POI) usually refers to geographical objects that can be abstracted as point markers. This study uses 2017 rail transit data, and the heat map of POI data distribution in Beijing after processing is shown in Figure2, and the distribution of POI by administrative districts in Beijing is shown in Figure 3. Overall, the POI points in Beijing are concentrated in the central urban areas, and the suburban areas are more sparsely distributed. Among them, Chaoyang District has the highest number of POI points, with 296117 points, and Mentougou District has the lowest number of POI points, with only 14997 points. The density of POI points in the east and west urban areas is the largest, with 1592.329243/km2 and 1557.074033/km2, respectively, the most densely distributed, while the density of POI in Mentougou District, Yanqing County, Huairou District, and Miyun County is lower, with less than 20/km2.Figure 2
POI point heat map.Figure 3
POI distribution by administrative regions in Beijing.


#### 3.1.2. AFC Data

AFC data has the advantages of fine data, large scale, and fast system update and has been better applied in the research of passenger flow prediction and residents’ travel behavior patterns [25]. The data used in this paper are the AFC data for a total of 11 days from April 12 to 22, 2017. A schematic diagram of the metro network in 2017 is shown in Figure 4, with 19 lines and 288 operating stations. The data recorded by the AFC system have a total of 19 fields, and the commonly used key fields are shown in Table 4. There are eight working days and three nonworking days in the selected 11 days, and the average daily data entries are about 6 million for working days and 4 million for nonworking days.Figure 4
2017 Beijing metro network diagram.Table 4
Commonly used key fields in AFC data.
The field names
Define
The sample
AFC_USEROD_ID
A unique ID that identifies a user
AFC_20170412_4983506
GRANT_CARD_CODE
One card issues a serial number
1000751000001147
ON_LINE_NAME
Name of the incoming line
Line 5,
ON_STATION_NAME
Inbound station name
Suburb
ON_STATION_TIME
Stop the time
2017/4/12 7 : 41 : 00
OFF_LINE_NAME
Name of outbound line
Line 5,
OFF_STATION_NAME
Name of outbound station
Magnetic device mouth
OFF_STATION_TIME
The outbound time
2017/4/12 8 : 24 : 10This study counted the daily passenger flow of the whole metro station from April 16 to April 22, 2017, and it can be seen in Figure5 that the network-wide passenger traffic from Monday to Thursday did not vary much, remaining around 5.48 million, and Friday increased compared to the previous four days, with the number increasing to around 5.74 million. The network-wide passenger flow on weekends decreased significantly compared to weekdays, by 3.7 million and 3.35 million, respectively. It can be seen that the passenger flow at rail stations has different characteristics compared to nonworking days, indicating that commuter travel is the main service target of Beijing’s rail transit system.Figure 5
Daily network-wide traffic from April 16 to April 22, 2017.Passenger flow also has different characteristics from the station’s perspective. For example, the size of the residential population around the residential station will have an impact on the scale of passenger flow [26], and the intensity of land development around the station also makes a difference in the passenger flow attractiveness of the station [27], and the comparison of the average daily passenger flow between the interchange and noninterchange stations is shown in Figure 6, where the average daily passenger flow of interchange stations is generally higher than that of noninterchange stations.Figure 6
Comparison of average daily passenger flow between interchange stations and noninterchange stations.


#### 3.1.3. Population Data

Baidu Wise-Eye Population Data is a commercial geographic intelligence data platform launched by Baidu Maps based on the massive location big data, geographic big data, and road condition big data sources of Baidu Maps, which are capable of being mined to get high accuracy and wide coverage of the residential and employment-population distribution. The processed population distribution of Beijing in 2017 is shown in Figures7–9. On the whole, the resident population of Beijing is concentrated in the central urban areas, and the suburban areas are more sparsely distributed. Among them, Chaoyang District and Haidian District have the largest resident populations, 2581997 and 2336486, respectively, while Yanqing County and Mentougou District have the smallest populations, both not exceeding 220,000; Xicheng District has the largest population density of 17862.60774 persons/km2 and is the most densely distributed, while Yanqing County has the lowest population density of fewer than 2000 persons/km2.Figure 7
Heat map of population distribution in Beijing.Figure 8
Heat map of population distribution around subway stations in Beijing.Figure 9
Population distribution by administrative regions in Beijing.


### 3.2. Analysis of the Relationship between Influencing Factors and Passenger Flow

#### 3.2.1. Calculation Results of Impact Factor Indicators

To facilitate statistics and calculations, the station impact range is represented as a circle with a uniform radius, and the circle’s center is the rail station’s location. Because passengers generally reach the endpoint by walking after arriving at a certain rail station or walking to find shared bikes and bus stops, only the acceptable range of walking connection is considered in the selection of the radius, and the value is generally 800 m as the researcher derived from the survey [28, 29], and the overlapping part of the circular buffer is divided based on the Tyson polygon, which makes the final result without overlapping area. The influence range of the 800-meter radius of the Beijing rail station is shown in Figure 10.Figure 10
Beijing subway station 800 m radius impact area.The building density around the stations is shown in Figure11. The calculation results show that the central city is generally higher than the suburbs, and the stations with the highest building density are Jinsong Station, Unity Lake Station, Wangjing Station, and Futong Station, and the nature of the land is mainly commercial service facilities.Figure 11
Building density around the stations.The number of station connections is shown in Figure12. The visualization results show that the interchange stations of the Beijing metro line network are mainly used for the connection of loop and radial lines without obvious aggregation characteristics, and the number of station connections is mostly four, connecting four directions.Figure 12
The number of connected stations.The population characteristics around the stations are shown in Figure13. The population density in the central city of Beijing is higher than that in the suburbs, among which the residential population is mainly concentrated in the southern area of the city, while the working population has a higher density in the northern part of the city, thus generating certain commuting demand.Figure 13
Population characteristics around the stations. (a) Population density around the stations; (b) density of population living around the stations; (c) working population density around the stations.
(a)
(b)
(c)Other transportation connections are shown in Figure14. From the results, it can be concluded that Beijing’s rail stations are relatively well connected, with most stations having more than 225 bike-sharing connections and more than 20 bus stop connections.Figure 14
Other transportation connections. (a) Shared bicycle connection density around the stations; (b) bus stop connection density around the stations.
(a)
(b)The daily average and peak hour passengers are the prediction objectives of this paper, reflecting the station’s passenger flow in two-time spans: all-day and peak hour, respectively. The average daily passenger flow reflects the overall level and scale of passenger flow at a station, while the peak hour passenger flow reflects the number of passengers a station needs to accommodate in a short period. The average weekday daily passenger flow, average nonworkday daily passenger flow, weekday peak hour passenger flow, and nonworkday peak hour passenger flow of Beijing rail stations are shown in Figure15.Figure 15
Passenger flow forecast target. (a) Average daily passenger flow at subway stations on weekdays; (b) average daily passenger flow at subway stations on nonworking days; (c) weekday peak hour passenger flow at subway stations; (d) nonworking day peak hour passenger flow at subway stations.
(a)
(b)
(c)
(d)


#### 3.2.2. Correlation Analysis

The results of the Pearson correlation analysis are shown in Figure16.Figure 16
Pearson correlation coefficient analysis of each index and average daily passenger flow. (a) Weekdays; (b) nonworking days.
(a)
(b)The correlation analysis shows that the correlation indexes of each indicator and passenger flow are above 0.3, which are all correlated, and the correlation between the indicators and passenger flow on weekdays is generally higher than that on nonworking days. Comparing the relationship between the daily average passenger flow and peak hour passenger flow with each indicator, the correlation indexes of the two are relatively close.In both scenarios, the strongest correlation is the density of shared bicycle connections around the station, indicating that more travelers use shared bicycle connections. The higher the station traffic, the more people enter and exit the station, and more shared bicycles are needed near the station, and conversely, the number of shared bicycles has an impact on passengers’ choice of rail station travel. The lowest correlations for the workday scenario are residential population density and bus stop connection density around the station. The nonworking day scenario has the lowest correlation of working population density.Overall, the high correlation between the three calculated indicators of population characteristics is due to the calculation method of the data, and there is a certain linear relationship between several data points. The lowest correlation is between the number of connecting stations and each other indicator, and there is no strong correlation between the remaining data. Therefore, these nine indicators are consistent with the multiplicity of factors.


### 3.3. Predicted Results

#### 3.3.1. Accuracy Analysis of Model Prediction

The evaluation metrics of model training accuracy use Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), Mean Absolute Percentage Error (MAPE), and R-squared (R2), and the calculation formula is shown in (11–14).(11)MAE=1n∑i=1nyi−yi′,(12)RMSE=1n∑i=1nyi−yi′2,(13)MAPE=100%n∑i=1nyi−yi′yi,(14)R2=1−∑i=1nyi−yi′2∑i=1nyi−yi^2.For the training accuracy of the four models, as shown in Tables5 and 6, the results of the 10% prediction group (a total of 28 groups of data) were selected to analyze the model training accuracy.Table 5
Model training accuracy analysis—average daily passenger flow.
Working days
Nonworking days
MAE
RMSE
MAPE (%)
R
2
MAE
RMSE
MAPE (%)
R
2
MLP
10945.76
14169.81
28.24
0.70
10249.49
13838.02
34.97
0.81
RBF
16141.67
19643.37
40.47
0.42
9363.49
13952.38
36.57
0.29
KNN
14938.37
19703.60
35.09
0.42
10132.86
13460.24
35.78
0.34
Multiple linear regression
12778.40
17631.87
28.86
0.53
9479.27
13856.82
31.52
0.30
Bold values are the values with the smallest errors in prediction results for each model under different scenarios.Table 6
Model training accuracy analysis—peak hour passenger flow.
Working days
Nonworking days
MAE
RMSE
MAPE (%)
R
2
MAE
RMSE
MAPE (%)
R
2
MLP
2108.24
2844.69
36.67
0.50
855.99
1100.52
35.01
0.41
RBF
2338.57
2878.00
38.14
0.48
874.24
1255.84
35.37
0.23
KNN
2330.95
3164.72
38.11
0.38
908.98
1155.27
36.80
0.35
Multiple linear regression
1795.44
2667.71
29.04
0.56
842.59
1200.30
31.66
0.30
Bold values are the values with the smallest errors in prediction results for each model under different scenarios. It shows that the model has the least training error.Comparing the training accuracy of the four models, the MLP model has a better training effect under the four conditions. The MLP model has the best performance in predicting average daily ridership, and the multiple linear regression model has the best performance in predicting peak hour ridership. Although the advantage of the MLP model in MAE, RMSE, and MAPE is not obvious, R2 is better than other models, indicating that the MLP model has a good fitting effect.By comparing the training accuracy of the two prediction targets of average daily passenger flow and peak-hour passenger flow, the error of the four models in predicting peak-hour passenger flow is slightly higher than that of average daily passenger flow, but the difference is not obvious. Therefore, the four models apply to the two prediction targets.By comparing the training accuracy of working day and nonworking day scenarios, it is found that the training accuracy of the RBF model in nonworking day scenarios is slightly higher than that in working day scenarios, the multiple linear regression model has better performance in working day scenarios, MLP and KNN models have no significant difference in the accuracy of the two scenarios, indicating that multiple linear regression is more suitable for the prediction of working day scenarios with more regular data. The other models are suitable for both scenarios.


#### 3.3.2. Typical Site Prediction Results

In this paper, among the 28 Beijing rail transit stations in the prediction set, typical representative stations are selected according to the scale of passenger flow, surrounding land use, and population distribution of each station as the objects of accuracy verification of the prediction model, namely, Wangjing Station, Xuanwumen Station, Wangfujing Station, Sanyuanqiao Station, and Sun Palace Station.The absolute error (AE) and relative error (RE) between the predicted and real values are used to evaluate the accuracy of the model, and the calculation formulae are shown in (15) and (16).(15)AE=yi−yi′,(16)RE=yi−yi′yi×100%,where n is the number of samples, yi is the true value, and yi′ is the output of the MLP model.The comparison of the prediction accuracy of the four models for track stations is shown in Tables7 and 8. Overall, the MLP model has a good training effect in all four cases. The MLP model performs better overall in the prediction of each type of station; the prediction accuracy of the RBF model and KNN model are highly volatile and slightly less stable; the multiple linear regression model has significantly higher prediction accuracy for weekdays than for nonworking days.Table 7
Accuracy analysis of passenger flow forecast at key stations—average daily passenger flow.
Working days
Nonworking days
Real value
Predictive value
AE
RE (%)
Real value
Predictive value
AE
RE (%)
Wangjing station
MLP
52278.86
55241.35
2962.49
5.67
34324.33
30859.36
3464.97
10.09
RBF
42518.02
9760.83
18.67
58468.51
24144.18
70.34
KNN
80979.51
28700.65
54.90
53692.67
19368.33
56.43
Multiple linear regression
78608.62
26329.76
50.36
49270.28
14945.94
43.54
Xuanwu gate station
MLP
48186.43
52131.55
3945.12
8.19
24992.00
32609.65
7617.65
30.48
RBF
66599.10
18412.67
38.21
27668.02
2676.02
10.71
KNN
46616.37
1570.06
3.26
37529.43
12537.43
50.17
Multiple linear regression
60622.19
12435.76
25.81
37243.07
12251.07
49.02
Wangfujing station
MLP
54176.57
44590.78
9585.79
17.69
48212.33
45665.49
2546.84
5.28
RBF
25790.44
28386.13
52.40
35479.34
12733.00
26.41
KNN
38219.10
15957.47
29.45
34991.91
13220.43
27.42
Multiple linear regression
38979.40
15197.17
28.05
22537.04
25675.30
53.25
Sanyuanqiao station
MLP
102299.14
73384.90
28914.24
28.26
45860.33
44970.05
890.28
1.94
RBF
65641.31
36657.83
35.83
36802.97
9057.36
19.75
KNN
56235.18
46063.96
45.03
36105.05
9755.29
21.27
Multiple linear regression
69438.94
32860.21
32.12
41644.00
4216.33
9.19
Sun palace station
MLP
50452.57
46294.36
4158.21
8.24
26563.67
23033.66
3530.00
13.29
RBF
38063.89
12388.68
24.56
30234.18
3670.51
13.82
KNN
44542.43
5910.14
11.71
24633.10
1930.57
7.27
Multiple linear regression
44584.70
5867.87
11.63
26859.95
296.28
1.12Table 8
Accuracy analysis of passenger flow forecast at key stations—peak hour passenger flow.
Working days
Nonworking days
Real value
Predictive value
AE
RE (%)
Real value
Predictive value
AE
RE (%)
Wangjing station
MLP
7582.86
6918.11
664.75
8.77
2826.00
2027.92
798.08
28.24
RBF
6310.97
1271.88
16.77
4209.88
1383.88
48.97
KNN
12339.29
4756.43
62.73
4593.14
1767.14
62.53
Multiple linear regression
11698.95
4116.10
54.28
4220.07
1394.07
49.33
Xuanwu gate station
MLP
9422.2
7644.66
1777.62
18.87
2217.33
3102.19
884.85
39.91
RBF
11541.89
2119.60
22.50
2785.65
568.32
25.63
KNN
6880.19
2542.10
26.98
3386.19
1168.86
52.71
Multiple linear regression
9387.40
34.89
0.37
3217.70
1000.36
45.12
Wangfujing station
MLP
6593.14
7660.82
1067.68
16.19
4467.00
5054.55
587.55
13.15
RBF
4189.84
2403.30
36.45
2684.43
1782.57
39.91
KNN
4278.17
2314.98
35.11
3055.43
1411.57
31.60
Multiple linear regression
6400.83
192.31
2.92
2006.67
2460.33
55.08
Sanyuanqiao station
MLP
16947.29
9517.60
7429.69
43.84
3804.67
4069.36
264.69
6.96
RBF
11043.97
5903.32
34.83
2809.12
995.55
26.17
KNN
8967.41
7979.88
47.09
3244.86
559.81
14.71
Multiple linear regression
10897.36
6049.93
35.70
3643.60
161.07
4.23
Sun palace station
MLP
7517.57
7868.74
351.17
4.67
2230.00
1960.66
269.34
12.08
RBF
6899.90
617.67
8.22
2591.98
361.98
16.23
KNN
7129.48
388.10
5.16
2141.86
88.14
3.95
Multiple linear regression
7005.64
511.93
6.81
2346.11
116.11
5.21
Bold values are the values with the smallest errors in the prediction results of the four models for each site under different scenarios.Comparing the prediction accuracy of passenger flow under two scenarios, weekday and nonworkday, the prediction accuracy of the four models is generally higher than that of nonworkday for the weekday scenario. This result is related to the commuting behavior on weekdays, where passengers have more definite travel demand and travel to and from their residence and workplace with more regularity, while the travel on nonworkdays is more random, so the predicted passenger flow from the built environment data may have some deviation.Comparing the training accuracy of the two prediction targets of daily average passenger flow and peak hour passenger flow, all four models have slightly higher errors in predicting peak hour passenger flow than daily average passenger flow because individual stations do not necessarily have peaks in passenger flow time variation, so the selected peak hours may not be representative.The comparison of prediction results of the Wangjing station is shown in Figure17. Among the prediction results, the MLP model performs the best in terms of stability and prediction accuracy, and the error is less than 30%; the prediction results of the multiple linear regression model and KNN model are less accurate but more stable; the prediction accuracy and stability of the RBF model are poor, and the prediction error ranges from 16.77% to 70.34%.Figure 17
Comparison of prediction results of Wangjing station.The comparison of prediction results of Xuanwumen Station is shown in Figure18. In the prediction results, the MLP model and the RBF model perform better, with prediction errors below 40%, while the remaining two comparison models are less stable, with errors greater than 50%. The four models have the largest errors in the prediction results of nonworking day peak hour passenger flows.Figure 18
Comparison of prediction results for Xuanwumen station.The prediction results of Wangfujing station are shown in Figure19. Among the prediction results, the MLP model has the highest accuracy, with all errors below 20%. However, all models have no significant advantage in predicting passenger flow during peak hours, especially during nonworking day peak hours, which is related to the time distribution characteristics of the stations. Most of the prediction results of the station are lower than the actual values because the surrounding stations have large shopping malls, offices, and commercial areas, where the passenger flow is higher than expected, and there is randomness in travel.Figure 19
Comparison of predicted results of Wangfujing Station.The prediction results of Sanyuanqiao station are shown in Figure20. In the prediction results, the prediction accuracy of the MLP model for the daily average passenger flow is better than that of the comparison model; in terms of the peak hourly passenger flow, the prediction results of the MLP model and the comparison model are different, and the prediction error of the MLP model is at a medium level.Figure 20
Comparison of prediction results of Sanyuanqiao station.The prediction results of the Sun Palace station are shown in Figure21. In the prediction results, the prediction accuracy of the MLP model is the best in the weekday scenario and slightly inferior to the comparison model in the nonweekday scenario, but the overall prediction errors are all below 15%. The prediction accuracy of this station is also the highest among all stations because the average daily passenger flow of Sun Palace station is about 40,000–50,000, and the passenger flow is characterized as “bimodal,” which is more common in Beijing’s rail transit system, so there are more samples of this type during training and the prediction accuracy is higher.Figure 21
Comparison of prediction results of Sun Palace Station.


## 3.1. Data Sources

### 3.1.1. POI Data

Point of interest (POI) usually refers to geographical objects that can be abstracted as point markers. This study uses 2017 rail transit data, and the heat map of POI data distribution in Beijing after processing is shown in Figure2, and the distribution of POI by administrative districts in Beijing is shown in Figure 3. Overall, the POI points in Beijing are concentrated in the central urban areas, and the suburban areas are more sparsely distributed. Among them, Chaoyang District has the highest number of POI points, with 296117 points, and Mentougou District has the lowest number of POI points, with only 14997 points. The density of POI points in the east and west urban areas is the largest, with 1592.329243/km2 and 1557.074033/km2, respectively, the most densely distributed, while the density of POI in Mentougou District, Yanqing County, Huairou District, and Miyun County is lower, with less than 20/km2.Figure 2
POI point heat map.Figure 3
POI distribution by administrative regions in Beijing.


### 3.1.2. AFC Data

AFC data has the advantages of fine data, large scale, and fast system update and has been better applied in the research of passenger flow prediction and residents’ travel behavior patterns [25]. The data used in this paper are the AFC data for a total of 11 days from April 12 to 22, 2017. A schematic diagram of the metro network in 2017 is shown in Figure 4, with 19 lines and 288 operating stations. The data recorded by the AFC system have a total of 19 fields, and the commonly used key fields are shown in Table 4. There are eight working days and three nonworking days in the selected 11 days, and the average daily data entries are about 6 million for working days and 4 million for nonworking days.Figure 4
2017 Beijing metro network diagram.Table 4
Commonly used key fields in AFC data.
The field names
Define
The sample
AFC_USEROD_ID
A unique ID that identifies a user
AFC_20170412_4983506
GRANT_CARD_CODE
One card issues a serial number
1000751000001147
ON_LINE_NAME
Name of the incoming line
Line 5,
ON_STATION_NAME
Inbound station name
Suburb
ON_STATION_TIME
Stop the time
2017/4/12 7 : 41 : 00
OFF_LINE_NAME
Name of outbound line
Line 5,
OFF_STATION_NAME
Name of outbound station
Magnetic device mouth
OFF_STATION_TIME
The outbound time
2017/4/12 8 : 24 : 10This study counted the daily passenger flow of the whole metro station from April 16 to April 22, 2017, and it can be seen in Figure5 that the network-wide passenger traffic from Monday to Thursday did not vary much, remaining around 5.48 million, and Friday increased compared to the previous four days, with the number increasing to around 5.74 million. The network-wide passenger flow on weekends decreased significantly compared to weekdays, by 3.7 million and 3.35 million, respectively. It can be seen that the passenger flow at rail stations has different characteristics compared to nonworking days, indicating that commuter travel is the main service target of Beijing’s rail transit system.Figure 5
Daily network-wide traffic from April 16 to April 22, 2017.Passenger flow also has different characteristics from the station’s perspective. For example, the size of the residential population around the residential station will have an impact on the scale of passenger flow [26], and the intensity of land development around the station also makes a difference in the passenger flow attractiveness of the station [27], and the comparison of the average daily passenger flow between the interchange and noninterchange stations is shown in Figure 6, where the average daily passenger flow of interchange stations is generally higher than that of noninterchange stations.Figure 6
Comparison of average daily passenger flow between interchange stations and noninterchange stations.


### 3.1.3. Population Data

Baidu Wise-Eye Population Data is a commercial geographic intelligence data platform launched by Baidu Maps based on the massive location big data, geographic big data, and road condition big data sources of Baidu Maps, which are capable of being mined to get high accuracy and wide coverage of the residential and employment-population distribution. The processed population distribution of Beijing in 2017 is shown in Figures7–9. On the whole, the resident population of Beijing is concentrated in the central urban areas, and the suburban areas are more sparsely distributed. Among them, Chaoyang District and Haidian District have the largest resident populations, 2581997 and 2336486, respectively, while Yanqing County and Mentougou District have the smallest populations, both not exceeding 220,000; Xicheng District has the largest population density of 17862.60774 persons/km2 and is the most densely distributed, while Yanqing County has the lowest population density of fewer than 2000 persons/km2.Figure 7
Heat map of population distribution in Beijing.Figure 8
Heat map of population distribution around subway stations in Beijing.Figure 9
Population distribution by administrative regions in Beijing.


## 3.1.1. POI Data

Point of interest (POI) usually refers to geographical objects that can be abstracted as point markers. This study uses 2017 rail transit data, and the heat map of POI data distribution in Beijing after processing is shown in Figure2, and the distribution of POI by administrative districts in Beijing is shown in Figure 3. Overall, the POI points in Beijing are concentrated in the central urban areas, and the suburban areas are more sparsely distributed. Among them, Chaoyang District has the highest number of POI points, with 296117 points, and Mentougou District has the lowest number of POI points, with only 14997 points. The density of POI points in the east and west urban areas is the largest, with 1592.329243/km2 and 1557.074033/km2, respectively, the most densely distributed, while the density of POI in Mentougou District, Yanqing County, Huairou District, and Miyun County is lower, with less than 20/km2.Figure 2
POI point heat map.Figure 3
POI distribution by administrative regions in Beijing.


## 3.1.2. AFC Data

AFC data has the advantages of fine data, large scale, and fast system update and has been better applied in the research of passenger flow prediction and residents’ travel behavior patterns [25]. The data used in this paper are the AFC data for a total of 11 days from April 12 to 22, 2017. A schematic diagram of the metro network in 2017 is shown in Figure 4, with 19 lines and 288 operating stations. The data recorded by the AFC system have a total of 19 fields, and the commonly used key fields are shown in Table 4. There are eight working days and three nonworking days in the selected 11 days, and the average daily data entries are about 6 million for working days and 4 million for nonworking days.Figure 4
2017 Beijing metro network diagram.Table 4
Commonly used key fields in AFC data.
The field names
Define
The sample
AFC_USEROD_ID
A unique ID that identifies a user
AFC_20170412_4983506
GRANT_CARD_CODE
One card issues a serial number
1000751000001147
ON_LINE_NAME
Name of the incoming line
Line 5,
ON_STATION_NAME
Inbound station name
Suburb
ON_STATION_TIME
Stop the time
2017/4/12 7 : 41 : 00
OFF_LINE_NAME
Name of outbound line
Line 5,
OFF_STATION_NAME
Name of outbound station
Magnetic device mouth
OFF_STATION_TIME
The outbound time
2017/4/12 8 : 24 : 10This study counted the daily passenger flow of the whole metro station from April 16 to April 22, 2017, and it can be seen in Figure5 that the network-wide passenger traffic from Monday to Thursday did not vary much, remaining around 5.48 million, and Friday increased compared to the previous four days, with the number increasing to around 5.74 million. The network-wide passenger flow on weekends decreased significantly compared to weekdays, by 3.7 million and 3.35 million, respectively. It can be seen that the passenger flow at rail stations has different characteristics compared to nonworking days, indicating that commuter travel is the main service target of Beijing’s rail transit system.Figure 5
Daily network-wide traffic from April 16 to April 22, 2017.Passenger flow also has different characteristics from the station’s perspective. For example, the size of the residential population around the residential station will have an impact on the scale of passenger flow [26], and the intensity of land development around the station also makes a difference in the passenger flow attractiveness of the station [27], and the comparison of the average daily passenger flow between the interchange and noninterchange stations is shown in Figure 6, where the average daily passenger flow of interchange stations is generally higher than that of noninterchange stations.Figure 6
Comparison of average daily passenger flow between interchange stations and noninterchange stations.


## 3.1.3. Population Data

Baidu Wise-Eye Population Data is a commercial geographic intelligence data platform launched by Baidu Maps based on the massive location big data, geographic big data, and road condition big data sources of Baidu Maps, which are capable of being mined to get high accuracy and wide coverage of the residential and employment-population distribution. The processed population distribution of Beijing in 2017 is shown in Figures7–9. On the whole, the resident population of Beijing is concentrated in the central urban areas, and the suburban areas are more sparsely distributed. Among them, Chaoyang District and Haidian District have the largest resident populations, 2581997 and 2336486, respectively, while Yanqing County and Mentougou District have the smallest populations, both not exceeding 220,000; Xicheng District has the largest population density of 17862.60774 persons/km2 and is the most densely distributed, while Yanqing County has the lowest population density of fewer than 2000 persons/km2.Figure 7
Heat map of population distribution in Beijing.Figure 8
Heat map of population distribution around subway stations in Beijing.Figure 9
Population distribution by administrative regions in Beijing.


## 3.2. Analysis of the Relationship between Influencing Factors and Passenger Flow

### 3.2.1. Calculation Results of Impact Factor Indicators

To facilitate statistics and calculations, the station impact range is represented as a circle with a uniform radius, and the circle’s center is the rail station’s location. Because passengers generally reach the endpoint by walking after arriving at a certain rail station or walking to find shared bikes and bus stops, only the acceptable range of walking connection is considered in the selection of the radius, and the value is generally 800 m as the researcher derived from the survey [28, 29], and the overlapping part of the circular buffer is divided based on the Tyson polygon, which makes the final result without overlapping area. The influence range of the 800-meter radius of the Beijing rail station is shown in Figure 10.Figure 10
Beijing subway station 800 m radius impact area.The building density around the stations is shown in Figure11. The calculation results show that the central city is generally higher than the suburbs, and the stations with the highest building density are Jinsong Station, Unity Lake Station, Wangjing Station, and Futong Station, and the nature of the land is mainly commercial service facilities.Figure 11
Building density around the stations.The number of station connections is shown in Figure12. The visualization results show that the interchange stations of the Beijing metro line network are mainly used for the connection of loop and radial lines without obvious aggregation characteristics, and the number of station connections is mostly four, connecting four directions.Figure 12
The number of connected stations.The population characteristics around the stations are shown in Figure13. The population density in the central city of Beijing is higher than that in the suburbs, among which the residential population is mainly concentrated in the southern area of the city, while the working population has a higher density in the northern part of the city, thus generating certain commuting demand.Figure 13
Population characteristics around the stations. (a) Population density around the stations; (b) density of population living around the stations; (c) working population density around the stations.
(a)
(b)
(c)Other transportation connections are shown in Figure14. From the results, it can be concluded that Beijing’s rail stations are relatively well connected, with most stations having more than 225 bike-sharing connections and more than 20 bus stop connections.Figure 14
Other transportation connections. (a) Shared bicycle connection density around the stations; (b) bus stop connection density around the stations.
(a)
(b)The daily average and peak hour passengers are the prediction objectives of this paper, reflecting the station’s passenger flow in two-time spans: all-day and peak hour, respectively. The average daily passenger flow reflects the overall level and scale of passenger flow at a station, while the peak hour passenger flow reflects the number of passengers a station needs to accommodate in a short period. The average weekday daily passenger flow, average nonworkday daily passenger flow, weekday peak hour passenger flow, and nonworkday peak hour passenger flow of Beijing rail stations are shown in Figure15.Figure 15
Passenger flow forecast target. (a) Average daily passenger flow at subway stations on weekdays; (b) average daily passenger flow at subway stations on nonworking days; (c) weekday peak hour passenger flow at subway stations; (d) nonworking day peak hour passenger flow at subway stations.
(a)
(b)
(c)
(d)


### 3.2.2. Correlation Analysis

The results of the Pearson correlation analysis are shown in Figure16.Figure 16
Pearson correlation coefficient analysis of each index and average daily passenger flow. (a) Weekdays; (b) nonworking days.
(a)
(b)The correlation analysis shows that the correlation indexes of each indicator and passenger flow are above 0.3, which are all correlated, and the correlation between the indicators and passenger flow on weekdays is generally higher than that on nonworking days. Comparing the relationship between the daily average passenger flow and peak hour passenger flow with each indicator, the correlation indexes of the two are relatively close.In both scenarios, the strongest correlation is the density of shared bicycle connections around the station, indicating that more travelers use shared bicycle connections. The higher the station traffic, the more people enter and exit the station, and more shared bicycles are needed near the station, and conversely, the number of shared bicycles has an impact on passengers’ choice of rail station travel. The lowest correlations for the workday scenario are residential population density and bus stop connection density around the station. The nonworking day scenario has the lowest correlation of working population density.Overall, the high correlation between the three calculated indicators of population characteristics is due to the calculation method of the data, and there is a certain linear relationship between several data points. The lowest correlation is between the number of connecting stations and each other indicator, and there is no strong correlation between the remaining data. Therefore, these nine indicators are consistent with the multiplicity of factors.


## 3.2.1. Calculation Results of Impact Factor Indicators

To facilitate statistics and calculations, the station impact range is represented as a circle with a uniform radius, and the circle’s center is the rail station’s location. Because passengers generally reach the endpoint by walking after arriving at a certain rail station or walking to find shared bikes and bus stops, only the acceptable range of walking connection is considered in the selection of the radius, and the value is generally 800 m as the researcher derived from the survey [28, 29], and the overlapping part of the circular buffer is divided based on the Tyson polygon, which makes the final result without overlapping area. The influence range of the 800-meter radius of the Beijing rail station is shown in Figure 10.Figure 10
Beijing subway station 800 m radius impact area.The building density around the stations is shown in Figure11. The calculation results show that the central city is generally higher than the suburbs, and the stations with the highest building density are Jinsong Station, Unity Lake Station, Wangjing Station, and Futong Station, and the nature of the land is mainly commercial service facilities.Figure 11
Building density around the stations.The number of station connections is shown in Figure12. The visualization results show that the interchange stations of the Beijing metro line network are mainly used for the connection of loop and radial lines without obvious aggregation characteristics, and the number of station connections is mostly four, connecting four directions.Figure 12
The number of connected stations.The population characteristics around the stations are shown in Figure13. The population density in the central city of Beijing is higher than that in the suburbs, among which the residential population is mainly concentrated in the southern area of the city, while the working population has a higher density in the northern part of the city, thus generating certain commuting demand.Figure 13
Population characteristics around the stations. (a) Population density around the stations; (b) density of population living around the stations; (c) working population density around the stations.
(a)
(b)
(c)Other transportation connections are shown in Figure14. From the results, it can be concluded that Beijing’s rail stations are relatively well connected, with most stations having more than 225 bike-sharing connections and more than 20 bus stop connections.Figure 14
Other transportation connections. (a) Shared bicycle connection density around the stations; (b) bus stop connection density around the stations.
(a)
(b)The daily average and peak hour passengers are the prediction objectives of this paper, reflecting the station’s passenger flow in two-time spans: all-day and peak hour, respectively. The average daily passenger flow reflects the overall level and scale of passenger flow at a station, while the peak hour passenger flow reflects the number of passengers a station needs to accommodate in a short period. The average weekday daily passenger flow, average nonworkday daily passenger flow, weekday peak hour passenger flow, and nonworkday peak hour passenger flow of Beijing rail stations are shown in Figure15.Figure 15
Passenger flow forecast target. (a) Average daily passenger flow at subway stations on weekdays; (b) average daily passenger flow at subway stations on nonworking days; (c) weekday peak hour passenger flow at subway stations; (d) nonworking day peak hour passenger flow at subway stations.
(a)
(b)
(c)
(d)


## 3.2.2. Correlation Analysis

The results of the Pearson correlation analysis are shown in Figure16.Figure 16
Pearson correlation coefficient analysis of each index and average daily passenger flow. (a) Weekdays; (b) nonworking days.
(a)
(b)The correlation analysis shows that the correlation indexes of each indicator and passenger flow are above 0.3, which are all correlated, and the correlation between the indicators and passenger flow on weekdays is generally higher than that on nonworking days. Comparing the relationship between the daily average passenger flow and peak hour passenger flow with each indicator, the correlation indexes of the two are relatively close.In both scenarios, the strongest correlation is the density of shared bicycle connections around the station, indicating that more travelers use shared bicycle connections. The higher the station traffic, the more people enter and exit the station, and more shared bicycles are needed near the station, and conversely, the number of shared bicycles has an impact on passengers’ choice of rail station travel. The lowest correlations for the workday scenario are residential population density and bus stop connection density around the station. The nonworking day scenario has the lowest correlation of working population density.Overall, the high correlation between the three calculated indicators of population characteristics is due to the calculation method of the data, and there is a certain linear relationship between several data points. The lowest correlation is between the number of connecting stations and each other indicator, and there is no strong correlation between the remaining data. Therefore, these nine indicators are consistent with the multiplicity of factors.


## 3.3. Predicted Results

### 3.3.1. Accuracy Analysis of Model Prediction

The evaluation metrics of model training accuracy use Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), Mean Absolute Percentage Error (MAPE), and R-squared (R2), and the calculation formula is shown in (11–14).(11)MAE=1n∑i=1nyi−yi′,(12)RMSE=1n∑i=1nyi−yi′2,(13)MAPE=100%n∑i=1nyi−yi′yi,(14)R2=1−∑i=1nyi−yi′2∑i=1nyi−yi^2.For the training accuracy of the four models, as shown in Tables5 and 6, the results of the 10% prediction group (a total of 28 groups of data) were selected to analyze the model training accuracy.Table 5
Model training accuracy analysis—average daily passenger flow.
Working days
Nonworking days
MAE
RMSE
MAPE (%)
R
2
MAE
RMSE
MAPE (%)
R
2
MLP
10945.76
14169.81
28.24
0.70
10249.49
13838.02
34.97
0.81
RBF
16141.67
19643.37
40.47
0.42
9363.49
13952.38
36.57
0.29
KNN
14938.37
19703.60
35.09
0.42
10132.86
13460.24
35.78
0.34
Multiple linear regression
12778.40
17631.87
28.86
0.53
9479.27
13856.82
31.52
0.30
Bold values are the values with the smallest errors in prediction results for each model under different scenarios.Table 6
Model training accuracy analysis—peak hour passenger flow.
Working days
Nonworking days
MAE
RMSE
MAPE (%)
R
2
MAE
RMSE
MAPE (%)
R
2
MLP
2108.24
2844.69
36.67
0.50
855.99
1100.52
35.01
0.41
RBF
2338.57
2878.00
38.14
0.48
874.24
1255.84
35.37
0.23
KNN
2330.95
3164.72
38.11
0.38
908.98
1155.27
36.80
0.35
Multiple linear regression
1795.44
2667.71
29.04
0.56
842.59
1200.30
31.66
0.30
Bold values are the values with the smallest errors in prediction results for each model under different scenarios. It shows that the model has the least training error.Comparing the training accuracy of the four models, the MLP model has a better training effect under the four conditions. The MLP model has the best performance in predicting average daily ridership, and the multiple linear regression model has the best performance in predicting peak hour ridership. Although the advantage of the MLP model in MAE, RMSE, and MAPE is not obvious, R2 is better than other models, indicating that the MLP model has a good fitting effect.By comparing the training accuracy of the two prediction targets of average daily passenger flow and peak-hour passenger flow, the error of the four models in predicting peak-hour passenger flow is slightly higher than that of average daily passenger flow, but the difference is not obvious. Therefore, the four models apply to the two prediction targets.By comparing the training accuracy of working day and nonworking day scenarios, it is found that the training accuracy of the RBF model in nonworking day scenarios is slightly higher than that in working day scenarios, the multiple linear regression model has better performance in working day scenarios, MLP and KNN models have no significant difference in the accuracy of the two scenarios, indicating that multiple linear regression is more suitable for the prediction of working day scenarios with more regular data. The other models are suitable for both scenarios.


### 3.3.2. Typical Site Prediction Results

In this paper, among the 28 Beijing rail transit stations in the prediction set, typical representative stations are selected according to the scale of passenger flow, surrounding land use, and population distribution of each station as the objects of accuracy verification of the prediction model, namely, Wangjing Station, Xuanwumen Station, Wangfujing Station, Sanyuanqiao Station, and Sun Palace Station.The absolute error (AE) and relative error (RE) between the predicted and real values are used to evaluate the accuracy of the model, and the calculation formulae are shown in (15) and (16).(15)AE=yi−yi′,(16)RE=yi−yi′yi×100%,where n is the number of samples, yi is the true value, and yi′ is the output of the MLP model.The comparison of the prediction accuracy of the four models for track stations is shown in Tables7 and 8. Overall, the MLP model has a good training effect in all four cases. The MLP model performs better overall in the prediction of each type of station; the prediction accuracy of the RBF model and KNN model are highly volatile and slightly less stable; the multiple linear regression model has significantly higher prediction accuracy for weekdays than for nonworking days.Table 7
Accuracy analysis of passenger flow forecast at key stations—average daily passenger flow.
Working days
Nonworking days
Real value
Predictive value
AE
RE (%)
Real value
Predictive value
AE
RE (%)
Wangjing station
MLP
52278.86
55241.35
2962.49
5.67
34324.33
30859.36
3464.97
10.09
RBF
42518.02
9760.83
18.67
58468.51
24144.18
70.34
KNN
80979.51
28700.65
54.90
53692.67
19368.33
56.43
Multiple linear regression
78608.62
26329.76
50.36
49270.28
14945.94
43.54
Xuanwu gate station
MLP
48186.43
52131.55
3945.12
8.19
24992.00
32609.65
7617.65
30.48
RBF
66599.10
18412.67
38.21
27668.02
2676.02
10.71
KNN
46616.37
1570.06
3.26
37529.43
12537.43
50.17
Multiple linear regression
60622.19
12435.76
25.81
37243.07
12251.07
49.02
Wangfujing station
MLP
54176.57
44590.78
9585.79
17.69
48212.33
45665.49
2546.84
5.28
RBF
25790.44
28386.13
52.40
35479.34
12733.00
26.41
KNN
38219.10
15957.47
29.45
34991.91
13220.43
27.42
Multiple linear regression
38979.40
15197.17
28.05
22537.04
25675.30
53.25
Sanyuanqiao station
MLP
102299.14
73384.90
28914.24
28.26
45860.33
44970.05
890.28
1.94
RBF
65641.31
36657.83
35.83
36802.97
9057.36
19.75
KNN
56235.18
46063.96
45.03
36105.05
9755.29
21.27
Multiple linear regression
69438.94
32860.21
32.12
41644.00
4216.33
9.19
Sun palace station
MLP
50452.57
46294.36
4158.21
8.24
26563.67
23033.66
3530.00
13.29
RBF
38063.89
12388.68
24.56
30234.18
3670.51
13.82
KNN
44542.43
5910.14
11.71
24633.10
1930.57
7.27
Multiple linear regression
44584.70
5867.87
11.63
26859.95
296.28
1.12Table 8
Accuracy analysis of passenger flow forecast at key stations—peak hour passenger flow.
Working days
Nonworking days
Real value
Predictive value
AE
RE (%)
Real value
Predictive value
AE
RE (%)
Wangjing station
MLP
7582.86
6918.11
664.75
8.77
2826.00
2027.92
798.08
28.24
RBF
6310.97
1271.88
16.77
4209.88
1383.88
48.97
KNN
12339.29
4756.43
62.73
4593.14
1767.14
62.53
Multiple linear regression
11698.95
4116.10
54.28
4220.07
1394.07
49.33
Xuanwu gate station
MLP
9422.2
7644.66
1777.62
18.87
2217.33
3102.19
884.85
39.91
RBF
11541.89
2119.60
22.50
2785.65
568.32
25.63
KNN
6880.19
2542.10
26.98
3386.19
1168.86
52.71
Multiple linear regression
9387.40
34.89
0.37
3217.70
1000.36
45.12
Wangfujing station
MLP
6593.14
7660.82
1067.68
16.19
4467.00
5054.55
587.55
13.15
RBF
4189.84
2403.30
36.45
2684.43
1782.57
39.91
KNN
4278.17
2314.98
35.11
3055.43
1411.57
31.60
Multiple linear regression
6400.83
192.31
2.92
2006.67
2460.33
55.08
Sanyuanqiao station
MLP
16947.29
9517.60
7429.69
43.84
3804.67
4069.36
264.69
6.96
RBF
11043.97
5903.32
34.83
2809.12
995.55
26.17
KNN
8967.41
7979.88
47.09
3244.86
559.81
14.71
Multiple linear regression
10897.36
6049.93
35.70
3643.60
161.07
4.23
Sun palace station
MLP
7517.57
7868.74
351.17
4.67
2230.00
1960.66
269.34
12.08
RBF
6899.90
617.67
8.22
2591.98
361.98
16.23
KNN
7129.48
388.10
5.16
2141.86
88.14
3.95
Multiple linear regression
7005.64
511.93
6.81
2346.11
116.11
5.21
Bold values are the values with the smallest errors in the prediction results of the four models for each site under different scenarios.Comparing the prediction accuracy of passenger flow under two scenarios, weekday and nonworkday, the prediction accuracy of the four models is generally higher than that of nonworkday for the weekday scenario. This result is related to the commuting behavior on weekdays, where passengers have more definite travel demand and travel to and from their residence and workplace with more regularity, while the travel on nonworkdays is more random, so the predicted passenger flow from the built environment data may have some deviation.Comparing the training accuracy of the two prediction targets of daily average passenger flow and peak hour passenger flow, all four models have slightly higher errors in predicting peak hour passenger flow than daily average passenger flow because individual stations do not necessarily have peaks in passenger flow time variation, so the selected peak hours may not be representative.The comparison of prediction results of the Wangjing station is shown in Figure17. Among the prediction results, the MLP model performs the best in terms of stability and prediction accuracy, and the error is less than 30%; the prediction results of the multiple linear regression model and KNN model are less accurate but more stable; the prediction accuracy and stability of the RBF model are poor, and the prediction error ranges from 16.77% to 70.34%.Figure 17
Comparison of prediction results of Wangjing station.The comparison of prediction results of Xuanwumen Station is shown in Figure18. In the prediction results, the MLP model and the RBF model perform better, with prediction errors below 40%, while the remaining two comparison models are less stable, with errors greater than 50%. The four models have the largest errors in the prediction results of nonworking day peak hour passenger flows.Figure 18
Comparison of prediction results for Xuanwumen station.The prediction results of Wangfujing station are shown in Figure19. Among the prediction results, the MLP model has the highest accuracy, with all errors below 20%. However, all models have no significant advantage in predicting passenger flow during peak hours, especially during nonworking day peak hours, which is related to the time distribution characteristics of the stations. Most of the prediction results of the station are lower than the actual values because the surrounding stations have large shopping malls, offices, and commercial areas, where the passenger flow is higher than expected, and there is randomness in travel.Figure 19
Comparison of predicted results of Wangfujing Station.The prediction results of Sanyuanqiao station are shown in Figure20. In the prediction results, the prediction accuracy of the MLP model for the daily average passenger flow is better than that of the comparison model; in terms of the peak hourly passenger flow, the prediction results of the MLP model and the comparison model are different, and the prediction error of the MLP model is at a medium level.Figure 20
Comparison of prediction results of Sanyuanqiao station.The prediction results of the Sun Palace station are shown in Figure21. In the prediction results, the prediction accuracy of the MLP model is the best in the weekday scenario and slightly inferior to the comparison model in the nonweekday scenario, but the overall prediction errors are all below 15%. The prediction accuracy of this station is also the highest among all stations because the average daily passenger flow of Sun Palace station is about 40,000–50,000, and the passenger flow is characterized as “bimodal,” which is more common in Beijing’s rail transit system, so there are more samples of this type during training and the prediction accuracy is higher.Figure 21
Comparison of prediction results of Sun Palace Station.


## 3.3.1. Accuracy Analysis of Model Prediction

The evaluation metrics of model training accuracy use Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), Mean Absolute Percentage Error (MAPE), and R-squared (R2), and the calculation formula is shown in (11–14).(11)MAE=1n∑i=1nyi−yi′,(12)RMSE=1n∑i=1nyi−yi′2,(13)MAPE=100%n∑i=1nyi−yi′yi,(14)R2=1−∑i=1nyi−yi′2∑i=1nyi−yi^2.For the training accuracy of the four models, as shown in Tables5 and 6, the results of the 10% prediction group (a total of 28 groups of data) were selected to analyze the model training accuracy.Table 5
Model training accuracy analysis—average daily passenger flow.
Working days
Nonworking days
MAE
RMSE
MAPE (%)
R
2
MAE
RMSE
MAPE (%)
R
2
MLP
10945.76
14169.81
28.24
0.70
10249.49
13838.02
34.97
0.81
RBF
16141.67
19643.37
40.47
0.42
9363.49
13952.38
36.57
0.29
KNN
14938.37
19703.60
35.09
0.42
10132.86
13460.24
35.78
0.34
Multiple linear regression
12778.40
17631.87
28.86
0.53
9479.27
13856.82
31.52
0.30
Bold values are the values with the smallest errors in prediction results for each model under different scenarios.Table 6
Model training accuracy analysis—peak hour passenger flow.
Working days
Nonworking days
MAE
RMSE
MAPE (%)
R
2
MAE
RMSE
MAPE (%)
R
2
MLP
2108.24
2844.69
36.67
0.50
855.99
1100.52
35.01
0.41
RBF
2338.57
2878.00
38.14
0.48
874.24
1255.84
35.37
0.23
KNN
2330.95
3164.72
38.11
0.38
908.98
1155.27
36.80
0.35
Multiple linear regression
1795.44
2667.71
29.04
0.56
842.59
1200.30
31.66
0.30
Bold values are the values with the smallest errors in prediction results for each model under different scenarios. It shows that the model has the least training error.Comparing the training accuracy of the four models, the MLP model has a better training effect under the four conditions. The MLP model has the best performance in predicting average daily ridership, and the multiple linear regression model has the best performance in predicting peak hour ridership. Although the advantage of the MLP model in MAE, RMSE, and MAPE is not obvious, R2 is better than other models, indicating that the MLP model has a good fitting effect.By comparing the training accuracy of the two prediction targets of average daily passenger flow and peak-hour passenger flow, the error of the four models in predicting peak-hour passenger flow is slightly higher than that of average daily passenger flow, but the difference is not obvious. Therefore, the four models apply to the two prediction targets.By comparing the training accuracy of working day and nonworking day scenarios, it is found that the training accuracy of the RBF model in nonworking day scenarios is slightly higher than that in working day scenarios, the multiple linear regression model has better performance in working day scenarios, MLP and KNN models have no significant difference in the accuracy of the two scenarios, indicating that multiple linear regression is more suitable for the prediction of working day scenarios with more regular data. The other models are suitable for both scenarios.


## 3.3.2. Typical Site Prediction Results

In this paper, among the 28 Beijing rail transit stations in the prediction set, typical representative stations are selected according to the scale of passenger flow, surrounding land use, and population distribution of each station as the objects of accuracy verification of the prediction model, namely, Wangjing Station, Xuanwumen Station, Wangfujing Station, Sanyuanqiao Station, and Sun Palace Station.The absolute error (AE) and relative error (RE) between the predicted and real values are used to evaluate the accuracy of the model, and the calculation formulae are shown in (15) and (16).(15)AE=yi−yi′,(16)RE=yi−yi′yi×100%,where n is the number of samples, yi is the true value, and yi′ is the output of the MLP model.The comparison of the prediction accuracy of the four models for track stations is shown in Tables7 and 8. Overall, the MLP model has a good training effect in all four cases. The MLP model performs better overall in the prediction of each type of station; the prediction accuracy of the RBF model and KNN model are highly volatile and slightly less stable; the multiple linear regression model has significantly higher prediction accuracy for weekdays than for nonworking days.Table 7
Accuracy analysis of passenger flow forecast at key stations—average daily passenger flow.
Working days
Nonworking days
Real value
Predictive value
AE
RE (%)
Real value
Predictive value
AE
RE (%)
Wangjing station
MLP
52278.86
55241.35
2962.49
5.67
34324.33
30859.36
3464.97
10.09
RBF
42518.02
9760.83
18.67
58468.51
24144.18
70.34
KNN
80979.51
28700.65
54.90
53692.67
19368.33
56.43
Multiple linear regression
78608.62
26329.76
50.36
49270.28
14945.94
43.54
Xuanwu gate station
MLP
48186.43
52131.55
3945.12
8.19
24992.00
32609.65
7617.65
30.48
RBF
66599.10
18412.67
38.21
27668.02
2676.02
10.71
KNN
46616.37
1570.06
3.26
37529.43
12537.43
50.17
Multiple linear regression
60622.19
12435.76
25.81
37243.07
12251.07
49.02
Wangfujing station
MLP
54176.57
44590.78
9585.79
17.69
48212.33
45665.49
2546.84
5.28
RBF
25790.44
28386.13
52.40
35479.34
12733.00
26.41
KNN
38219.10
15957.47
29.45
34991.91
13220.43
27.42
Multiple linear regression
38979.40
15197.17
28.05
22537.04
25675.30
53.25
Sanyuanqiao station
MLP
102299.14
73384.90
28914.24
28.26
45860.33
44970.05
890.28
1.94
RBF
65641.31
36657.83
35.83
36802.97
9057.36
19.75
KNN
56235.18
46063.96
45.03
36105.05
9755.29
21.27
Multiple linear regression
69438.94
32860.21
32.12
41644.00
4216.33
9.19
Sun palace station
MLP
50452.57
46294.36
4158.21
8.24
26563.67
23033.66
3530.00
13.29
RBF
38063.89
12388.68
24.56
30234.18
3670.51
13.82
KNN
44542.43
5910.14
11.71
24633.10
1930.57
7.27
Multiple linear regression
44584.70
5867.87
11.63
26859.95
296.28
1.12Table 8
Accuracy analysis of passenger flow forecast at key stations—peak hour passenger flow.
Working days
Nonworking days
Real value
Predictive value
AE
RE (%)
Real value
Predictive value
AE
RE (%)
Wangjing station
MLP
7582.86
6918.11
664.75
8.77
2826.00
2027.92
798.08
28.24
RBF
6310.97
1271.88
16.77
4209.88
1383.88
48.97
KNN
12339.29
4756.43
62.73
4593.14
1767.14
62.53
Multiple linear regression
11698.95
4116.10
54.28
4220.07
1394.07
49.33
Xuanwu gate station
MLP
9422.2
7644.66
1777.62
18.87
2217.33
3102.19
884.85
39.91
RBF
11541.89
2119.60
22.50
2785.65
568.32
25.63
KNN
6880.19
2542.10
26.98
3386.19
1168.86
52.71
Multiple linear regression
9387.40
34.89
0.37
3217.70
1000.36
45.12
Wangfujing station
MLP
6593.14
7660.82
1067.68
16.19
4467.00
5054.55
587.55
13.15
RBF
4189.84
2403.30
36.45
2684.43
1782.57
39.91
KNN
4278.17
2314.98
35.11
3055.43
1411.57
31.60
Multiple linear regression
6400.83
192.31
2.92
2006.67
2460.33
55.08
Sanyuanqiao station
MLP
16947.29
9517.60
7429.69
43.84
3804.67
4069.36
264.69
6.96
RBF
11043.97
5903.32
34.83
2809.12
995.55
26.17
KNN
8967.41
7979.88
47.09
3244.86
559.81
14.71
Multiple linear regression
10897.36
6049.93
35.70
3643.60
161.07
4.23
Sun palace station
MLP
7517.57
7868.74
351.17
4.67
2230.00
1960.66
269.34
12.08
RBF
6899.90
617.67
8.22
2591.98
361.98
16.23
KNN
7129.48
388.10
5.16
2141.86
88.14
3.95
Multiple linear regression
7005.64
511.93
6.81
2346.11
116.11
5.21
Bold values are the values with the smallest errors in the prediction results of the four models for each site under different scenarios.Comparing the prediction accuracy of passenger flow under two scenarios, weekday and nonworkday, the prediction accuracy of the four models is generally higher than that of nonworkday for the weekday scenario. This result is related to the commuting behavior on weekdays, where passengers have more definite travel demand and travel to and from their residence and workplace with more regularity, while the travel on nonworkdays is more random, so the predicted passenger flow from the built environment data may have some deviation.Comparing the training accuracy of the two prediction targets of daily average passenger flow and peak hour passenger flow, all four models have slightly higher errors in predicting peak hour passenger flow than daily average passenger flow because individual stations do not necessarily have peaks in passenger flow time variation, so the selected peak hours may not be representative.The comparison of prediction results of the Wangjing station is shown in Figure17. Among the prediction results, the MLP model performs the best in terms of stability and prediction accuracy, and the error is less than 30%; the prediction results of the multiple linear regression model and KNN model are less accurate but more stable; the prediction accuracy and stability of the RBF model are poor, and the prediction error ranges from 16.77% to 70.34%.Figure 17
Comparison of prediction results of Wangjing station.The comparison of prediction results of Xuanwumen Station is shown in Figure18. In the prediction results, the MLP model and the RBF model perform better, with prediction errors below 40%, while the remaining two comparison models are less stable, with errors greater than 50%. The four models have the largest errors in the prediction results of nonworking day peak hour passenger flows.Figure 18
Comparison of prediction results for Xuanwumen station.The prediction results of Wangfujing station are shown in Figure19. Among the prediction results, the MLP model has the highest accuracy, with all errors below 20%. However, all models have no significant advantage in predicting passenger flow during peak hours, especially during nonworking day peak hours, which is related to the time distribution characteristics of the stations. Most of the prediction results of the station are lower than the actual values because the surrounding stations have large shopping malls, offices, and commercial areas, where the passenger flow is higher than expected, and there is randomness in travel.Figure 19
Comparison of predicted results of Wangfujing Station.The prediction results of Sanyuanqiao station are shown in Figure20. In the prediction results, the prediction accuracy of the MLP model for the daily average passenger flow is better than that of the comparison model; in terms of the peak hourly passenger flow, the prediction results of the MLP model and the comparison model are different, and the prediction error of the MLP model is at a medium level.Figure 20
Comparison of prediction results of Sanyuanqiao station.The prediction results of the Sun Palace station are shown in Figure21. In the prediction results, the prediction accuracy of the MLP model is the best in the weekday scenario and slightly inferior to the comparison model in the nonweekday scenario, but the overall prediction errors are all below 15%. The prediction accuracy of this station is also the highest among all stations because the average daily passenger flow of Sun Palace station is about 40,000–50,000, and the passenger flow is characterized as “bimodal,” which is more common in Beijing’s rail transit system, so there are more samples of this type during training and the prediction accuracy is higher.Figure 21
Comparison of prediction results of Sun Palace Station.


## 4. Discussion

In the decision-making stage before the line or station is put into construction, the forecast results of the average daily passenger flow can be used as a reference for the scale of station construction and line use models, and subsequently, the impact of new lines or stations on existing lines or stations can be analyzed on this basis.The peak hourly passenger flow reflects the number of passengers a station needs to accommodate in a short period, and the prediction results provide a theoretical basis for designing station facility parameters such as station escalator width to avoid crowding caused by actual passenger flow exceeding the designed passenger flow or waste of resources caused by actual passenger flow much smaller than the designed passenger flow, to achieve the goal of reducing rail transit operation and maintenance costs and improving passenger travel quality.


## 5. Conclusion

Based on mining Beijing POI data, Beijing rail transit AFC data, and Baidu Wise-Eye population data, the article establishes a passenger flow prediction model based on multilayer perceptron for predicting the average daily and peak hourly passenger flow of stations and verifies the accuracy of the prediction results by taking Wangjing Station, Xuanwumen Station, Wangfujing Station, Sanyuanqiao Station, and Sun Palace Station as examples. The prediction results of the RBF model, KNN model, and multiple linear regression model are compared to verify the effectiveness of the MLP model. The main research results and conclusions are as follows:(1)
A total of seven indicators in four aspects, namely, land development intensity, station connectivity characteristics, station peripheral population characteristics, and other transportation connections, are explored to influence the degree of rail transit station passenger flow. The results show that the correlation between each indicator and weekday passenger flow is generally higher than that on nonworking days, and the indicator with the highest correlation is the density of shared bicycle connections around the station, indicating that more travelers use shared bicycle connections. The higher the passenger flow of the station, the more people enter and exit the station, and more shared bikes are needed near the station, and conversely, the number of shared bikes will have an impact on passengers’ choice of rail station travel.(2)
The MLP-based rail station passenger flow prediction model is constructed, and three comparison models, the RBF model, the KNN model, and the multiple linear regression model are set up to analyze the prediction results of typical stations. The training results of the RBF model fluctuate at individual stations and have a large degree of dispersion, thus causing poor stability in station prediction as well.(3)
The prediction of typical stations with representative predictions shows that there are differences in the prediction accuracy of different stations. The Wangjing and Sun Palace stations with the highest prediction accuracy are both characterized by an average daily passenger flow of 40,000 to 50,000 people per day, with obvious “bimodal” passenger flow characteristics, which are more common in Beijing’s rail transit system, so the training has more samples of this type and higher prediction accuracy.However, due to the study’s time, level, and conditions, the paper has some shortcomings, such as the prediction target being a single station and the impact of the new station on the whole network is not considered.



---

*Source: 1430449-2023-03-03.xml*