## 3 Methodology
### Model Implementation  
In summary, the proposed Joint-IF model mainly consists of an LRMF-based missing data imputation module and an LSTM-based multivariate prediction module for transfer passenger flow. The pseudo-code of this Joint-IF is described in Algorithm 1 below. ``` Input: Feature vectors \(\mathbf{q}\); transfer passenger flow matrix \(\mathbf{Y}\in\mathbb{R}^{M\times N}\); rank \(R\); missing rate and missing scenarios; \(\Pi=\{u_{1},\ldots,u_{k},\ldots,u_{d}\}\) as the time lag; a spatial matrix \(\mathbf{W}\in\mathbb{R}^{R\times M}\) and a temporal matrix \(\mathbf{X}\in\mathbb{R}^{R\times N}\); AR regularized coefficient matrix \(\Theta\); the number of initial iterations \(m_{1}\) and the number of estimated samples \(m_{2}\). Output: Forecasting results \(\hat{\mathbf{Y}}\) of the transfer passenger flow Initialization: Training parameters of the Joint-IF framework Begin For\(i\) to \(m_{1}+m_{2}\)do  Calculate and update the spatial matrix \(\mathbf{W}\): \[\mathbf{w}_{i}=\left(\sum\limits_{t:(i)\in\Omega}x_{t}x_{t}^{T}\right)^{-1}\sum \limits_{t:(i,t)\in\Omega}y_{i,t}x_{t}\]  Calculate and update the temporal matrix \(\mathbf{X



hourly intervals. Figure 2 depicts the spatial distribution of metro lines, metro stations and transfer passenger flow. Figure 3 shows the distribution of transfer passenger flow at all metro stations. Similarly, the external factors have significant influences on transfer flows, including weather variables (e.g., wind speed, temperature, visibility and rainfall), socio-economic level, demographic variables (e.g., housing price, rent, GDP near metro site and population density), built environment variables (e.g., the transfer distance between metro and bus lines, the number of bus lines and their stops near metro sites and the distance between metro distance from CBD), and POI information (e.g., the scenic spots, business housing, technology, culture, finance, insurance, shopping mall and accommodation services near a metro station). Notably, these external factors require reformatting to better match transfer flow, and they are integrated and fed into the prediction model but without being predicted. Table 1 outlines the definitions and statistical properties of all the target and external variables. Figure 3: Distribution characteristics of the transfer passenger flow at all metro stations. Figure 2: Spatial distribution of the study areas and transfer passenger flow therein. ### Performance Metrics

We adopted four evaluation metrics (i.e., mean absolute percentage error (MAPE), root mean squared error (RMSE), mean absolute error (MAE) and goodness of fit (R\({}^{2}\))) [39; 40; 41] to assess and compare the outputs of all models. The detailed formulations of the four indexes are written as follows:

\[\text{MAPE}= \frac{1}{|\Omega|}\sum_{(i,t)\in\Omega}\left|\frac{\varPsi_{i,t}- \widetilde{\varPsi}_{i,t}/\varphi_{i,t}}{\varPsi_{i,t}}\right|\times 100 \tag{12}\] \[\text{RMSE}= \sqrt{\frac{1}{|\Omega|}\sum_{(i,t)\in\Omega}(\varpsi_{i,t}- \widetilde{\varpsi}_{i,t}/\hat{\varpsi}_{i,t})^{2}}\] (13) \[\text{MAE}= \frac{1}{|\Omega|}\sum_{(i,t)\in\Omega}\left|\varpsi_{i,t}- \widetilde{\varpsi}_{i,t}/\hat{\varpsi}_{i,t}\right|\] (14) \[\text{R}^{2}=\frac{\sum_{(i,t)\in\Omega}(\varpsi_{i,t}- \overline{\varpsi}_{i,t})^{2}-\sum_{(i,t)\in\Omega}(\varpsi_{i,t}-\widetilde{ \varpsi}_{i,t}/\hat{\varpsi}_{i,t})^{2}}{\sum_{(i,t)\in\Omega}(\varpsi_{i,t}- \widetilde{\varpsi}_{i,t}/\hat{\varpsi}_{i,t})^{2}} \tag{15}\]

where \(\varpsi_{i,t}\), \(\widetilde{\varpsi}_{i,t}\), \(\varphi_{i,t}\) and \(\overline{\varpsi}_{i,t}\) denote the real value, repaired value, estimated value and mean value, respectively, and \(|\Omega|\) is the size of the index set \(\Omega\). ### Baseline Models

To validate the effectiveness and robustness of Joint-IF, we selected several multivariate methods (including statistical and DL models) as baseline models to demonstrate the superiority of Joint-IF in imputing and forecasting transfer passenger flow, with the baseline models described below.