Porto route prediction

Cabrynt

Route-aware trip prediction, delivered through ASP.NET Core.

The quote API combines road routing, quote-time context, ONNX inference, and PostgreSQL persistence.

Cabrynt model demo showing a Porto route, OSRM baseline, and ML-corrected trip-duration prediction

A backend workflow with an ML prediction step.

01→

Route request

Coordinates and ride details

02→

ASP.NET Core quote API

Validation and orchestration

03→

OSRM + weather context

Road baseline and features

04→

ONNX correction

Residual prediction

05

PostgreSQL snapshot

Persisted quote response

The API validates Porto-scoped coordinates, calculates the road-route baseline, applies the model only when its dependencies are available, and persists the displayed quote when a ride request is created.

Model performance

The deployed model was trained on 200,000 route-ready historical Porto trips and evaluated on a separate set of 5,000 unseen trips.

Improvement

38% lower MAE

5.488 min → 3.383 min
ModelMAEMedian absolute errorP90 absolute error
Direct OSRM5.488 min3.530 min10.817 min
OSRM + ML residual correction3.383 min1.656 min6.702 min

2.105 minutes lower MAE than direct OSRM on the final held-out evaluation set.

Open live model demo