## 3 Methodology
### Establishment of Ensemble Learning Prediction Models  
To further improve prediction performance, we propose an ensemble learning framework that integrates shallow learning and deep learning models.  
The ensemble learning framework includes the following steps:  
(1) Base learner selection: Select two base learners with distinctly different characteristics--linear regression (shallow learning model) and the determined optimal LSTM-DNN model (deep learning model) [15]. The selection of these two models is based on the following considerations:  
1. Linear regression models are simple, computationally efficient, and highly interpretable, but have limited capability for modeling nonlinear relationships.
2. LSTM-DNN models are complex with high computational overhead, but can capture nonlinear relationships and temporal dependencies in data.  
Figure 1: Schematic illustration of sliding time window-based dynamic prediction mechanism.  
The complementary characteristics of these two models make them an ideal base learner combination for ensemble learning.  
(2) Base prediction generation: For each prediction scenario, apply the two base learners to the training and validation sets to generate prediction results. Specifically, for each sliding time window and prediction scale combination, we used linear regression and LSTM-DNN models respectively for prediction.  
(3) Feature construction: Combine the prediction results into a matrix as input features for the meta-learner. Each row of this matrix corresponds to one time step and contains the prediction values of the two base learners for that time step.  
(4) Meta-learner training: Use the feature matrix as independent variables and actual travel time values as dependent variables to train various meta-learners. We selected multiple different types of meta-learners, including the following:  
i. Linear regression: The simplest meta-learner that linearly combines the prediction results of base learners.  
ii. Random forest: An ensemble learning method capable of capturing complex nonlinear relationships between features.  
iii. LSTM-DNN models: We selected two different configurations of LSTM-DNN models as meta-learners.  
LSTM-DNN(1): Contains 1 LSTM layer (64 LSTM units) and 2 fully connected layers (64 neurons per layer).  
LSTM-DNN(2): Contains 1 LSTM layer (16 LSTM units) and 2 fully connected layers (16 neurons per layer).  
iv. DNN models: We selected two different configurations of DNN models as meta-learners.  
DNN64_2: Contains 2 fully connected layers (64 neurons per layer).  
DNN16_2: Contains 2 fully connected layers (16 neurons per layer).  
(5) Ensemble prediction: For the test set of each prediction scenario, use the trained ensemble learning model for prediction and calculate its performance metrics.  
The ensemble learning framework proposed in this manuscript has the following advantages:  
(1) Model complementarity: By combining base learners with different characteristics, it can fully utilize the advantages of each model and compensate for their respective shortcomings.  
(2) Multi-meta-learner exploration: Attempting multiple different types and complexities of meta-learners to find the most suitable combination for specific prediction scenarios.  
(3) Flexibility: The framework design is flexible and can add or replace base learners and meta-learners as needed to adapt to different prediction tasks.  
(4) Scenario adaptability: Can select optimal ensemble models for different prediction scenarios (such as different sliding time window lengths and prediction scales).  
Through this ensemble learning framework, we expect to further improve the performance of urban road travel time prediction, particularly in complex prediction scenarios.