## 3 Methods
### Spatial Correlation Based on Station  
Stations exhibiting similar patterns of flow fluctuations are regarded as correlated. Consequently, in this study, the metro flow of correlated stations is incorporated to construct predictive models. However, stations with such correlations are not always geographically adjacent. Additionally, the metro flow at a specific station is typically influenced by the flow patterns at stations that are similarly correlated. Thus, the mutual information is utilized in this study to select the stations that have an important impact on the current station using historical metro flow data. Mutual information is very capable of capturing the nonlinearity of flow data. Unlike traditional correlation coefficients, such as the Pearson correlation coefficient, which predominantly focuses on linear relationships, mutual information has the ability to effectively measure both linear and nonlinear correlations. Considering that the traffic of the examined station is affected by the traffic of the upstream stations, only the upstream stations that have a significant impact on the examined station are considered.  
The vectors \(X^{\text{i}}=(x^{\text{i}}_{1},x^{\text{i}}_{2},\cdots,x^{\text{i}}_{h})\) and \(X^{\text{s}}=(x^{\text{s}}_{1},x^{\text{s}}_{2},\cdots,x^{\text{s}}_{h})\) represent the entry and exit station sequences of site \(i\) and site \(s\), respectively. Where \(i,s\in(1,2,\cdots,n)\), \(h\) represents the number of input data and \(x^{i}_{h}\) represents the entry and exit flow at station \(i\) in the \(h^{th}\) time interval. The series statistics represent the number of entry and exit stations of a station over a fixed length of time and arrange them in chronological order. The information entropy, \(H(X^{i})\),of the entry and exit stations, \(X^{i}\), of the station, \(i\), is expressed as  
\[H(X^{\text{i}})=\sum_{c_{i}\in X^{\text{i}}}p(c_{i})\text{lg}p(c_{i}) \tag{1}\]  
Here, \(c_{i}\) is the number of entry and exit stations at a certain time in the sequence of station entry and exit stations in \(X^{i}\), while \(p(c_{i})\) is the probability of \(x^{i}_{i}=c_{i}\).  
Figure 1: The research framework of this study.  
The mutual information, \(l^{is}(X^{i};X^{s})\), of \(X^{i}\) and \(X^{s}\) is calculated to represent the correlation between site \(i\) and site \(s\).  
\[l^{\rm is}(X^{i};X^{s})=H(X^{i})-H(X^{i}|X^{s}) \tag{2}\]  
\[l^{\rm is}(X^{i};X^{s})=\sum_{c_{i}\in X^{i}}\sum_{c_{s}\in X^{s}}p(c_{i},c_{s} )\lg\frac{p(c_{i},c_{s})}{p(c_{i})p(c_{s})} \tag{3}\]  
Here, \(H(X^{i};X^{s})\) is \(X^{i}\) conditional entropy of given \(X^{s}\), which represents the uncertainty of the entry and exit station quantity \(X^{i}\) of station \(i\) when the value of the entry and exit station quantity \(X^{s}\) of station \(s\) is given; \(p(c_{i},c_{s})\) is a joint probability function of \(x^{i}_{t}=c_{i}\) and \(x^{s}_{t}=c_{s}\). The mutual information measures the degree of interdependence between two variables, indicating the reduced uncertainty of one variable by knowing another variable by computing the mutual information to obtain the two upstream sites most relevant to the current site.