Headway
4

Models line · 04 of 13

Travel-time model

A multi-layer perceptron written in numpy predicts trip minutes from pickup zone, drop-off zone, hour, weekday and distance. It ties a per-route lookup table overall and clearly wins where data is thin.

Test set
93,592 held-out trips, last week of January
MAE
3.23 min (lookup table 3.24, distance-only 4.14)
Rare routes
3.25 vs 4.69 for the lookup table
Files
delivery/nn.py train_nn.py mlp.npz

Test results

ModelMAE (min)RMSEBias
NN (MLP)3.235.44-1.87
hist-avg (pair,hour)3.245.42-1.61
distance-linear4.146.40-1.62
global mean5.458.88-1.31

Figures

Validation error per epoch, early stopping at 9
Validation error per epoch, early stopping at 9
Error by hour of day
Error by hour of day
Predicted zone-to-zone minutes at 08:00 and 18:00, and the daily curve
Predicted zone-to-zone minutes at 08:00 and 18:00, and the daily curve