Abstract
Predicting urban travel times is a critical challenge for logistics and real-time dispatching. This study evaluates the performance of tree-based machine learning ensembles—including Random Forest, XGBoost, and LightGBM—in the high-density environment of Manhattan. By integrating historical taxi records with road-network features from the Open Source Routing Machine (OSRM), the researchers demonstrate that short-term models trained on recent data can provide high-quality, computationally efficient predictions suitable for real-time dispatching. Results indicate that XGBoost provides superior accuracy, while LightGBM offers a significant advantage in training speed.
Introduction
Predicting travel time in a dense urban environment like Manhattan is notoriously difficult due to the inherent "noise" of city life, including fluctuating traffic congestion, weather conditions, and temporal patterns. While large-scale traffic flow simulations can provide detailed insights, they are often too computationally intensive for real-time use. Conversely, relying on commercial APIs for high-frequency dispatching queries can be prohibitively expensive and slow.
This research seeks a middle ground by developing an efficient "origin-destination" based model. The objective is to leverage readily available taxi records and open-source routing data to provide high-quality predictions for both long-term planning and immediate, real-time dispatching needs.
Methods and Data
The study evaluates several tree-based learning algorithms, chosen for their ability to model non-linear relationships and handle feature co-linearity without the extreme computational overhead of deep learning architectures. The algorithms tested include CART (Classification and Regression Trees), Random Forest, Extra Trees, XGBoost, and LightGBM.
Feature Engineering
A core component of the methodology is the enrichment of raw trip data. Rather than relying solely on coordinates, the researchers utilized the Open Source Routing Machine (OSRM) to calculate "theoretical" fastest routes under free-flow conditions. This process generated critical features such as osrm_distance, osrm_duration, and road-network specifics like the number of turns and steps.
As illustrated in Figure 1, decision trees partition the data based on features like day type, time, and weather to arrive at a predicted travel time. Ensembles improve upon this by combining multiple such trees to reduce variance and bias.
Datasets
The models were trained and validated using three primary data sources:
- NYC TLC Trip Record Data: Approximately 326,000 daily yellow and green taxi trips in Manhattan from January to June 2016.
- National Weather Service Data: Daily average weather metrics for New York City.
- OSRM Features: Road-network-specific data derived from OpenStreetMap.
The distribution of trip durations (Figure 6) highlights the variability in the dataset, with a significant concentration of trips occurring within the 10-to-30-minute range, typical for Manhattan travel.
Key Insights and Results
The research yielded several critical findings regarding model performance and operational efficiency:
- The Power of Routing Enrichment: Features derived from OSRM, such as the "main street ratio," were highly correlated with actual travel times. Integrating these theoretical baselines significantly enhanced the models' predictive power.
- Short-Term "Memory" and Efficiency: For real-time forecasting, the researchers found that trip durations are primarily influenced by the traffic state of the immediately preceding hour. Interestingly, short-term models trained on minimal recent data often outperformed massive long-term models. This suggests that capturing the current state of the city is more effective than searching for patterns within a vast historical dataset.
- Performance Benchmarks: All tree-based ensembles significantly outperformed the naive baseline (RMSE of 368.97). XGBoost achieved the highest raw accuracy with an RMSE of 253.37 seconds. However, LightGBM emerged as the most efficient choice, training up to 43 times faster than XGBoost with negligible loss in precision.
Conclusion
Tree-based ensembles, particularly when enriched with road-network metadata, provide a robust framework for urban travel time prediction. While XGBoost offers peak accuracy, the training efficiency of LightGBM makes it highly suitable for dynamic environments. Future work should focus on increasing the granularity of weather data and developing methods for uncertainty quantification to provide prediction intervals rather than single-point estimates, further improving the utility of these models for real-world logistics.
Summary updated