What it does
Given an origin and destination (airport codes, city names, or coordinates),TransportPredictor returns fare and time estimates for every transport mode, using ensemble ML models trained on real schedule and ticket data.
Models at a glance
| Mode | Output | R² | Training data |
|---|---|---|---|
| Air fare | Economy / business fare (USD) | 0.92 | BTS DB1B 2023–2025 |
| Air time | Block time (minutes) | 0.94 | BTS T-100 2023–2025 |
| Drive time | Door-to-door drive time | 0.99 | OSRM / OpenStreetMap |
| Drive fare | Fuel cost estimate | — | Formula-based |
| Bus fare | Intercity fare | — | Calibrated heuristic |
| Bus time | Intercity travel time | — | Calibrated heuristic |
| Train time | Amtrak travel time | 0.99 | Amtrak GTFS |
Design
- Single entry point:
TransportPredictor— no need to import individual predictors. - Ensemble architecture: each trained model is either HistGradientBoosting, RandomForest, or an average ensemble — whichever scored best on validation.
- Graceful degradation:
predict()uses ML;estimate()uses heuristics — both always return a value. - Extensible: abstract
BaseTrainer/BasePredictormake it straightforward to add new modes.