Context

The collector already produces a usable sequence of evidence: route positions, stop passages, stop visits, and stop-to-stop segment runs. That evidence can answer a practical question without a trained model: how long has this segment taken on comparable historical runs, and how does the current sample compare with that baseline?

The forecast/ directory contains offline Python experiments for bus speed and arrival forecasting. A transformer or another learned model may eventually improve a prediction, but its presence in a research directory does not make it the production ETA engine. The production system needs a result that can be traced to stored observations and inspected when the answer is wrong.

Decision

Production ETA uses deterministic segment baselines first. The current selector prefers at least 30 historical segment samples from the same weekday and hour, then the same hour, then the segment across all available times. When no usable baseline reaches the sample requirement, the ETA path falls back to a fixed 18 km/h speed and marks the estimate as a fallback.

Recent live segment runs can adjust a historical baseline when the evidence is strong enough. The current ETA implementation requires at least three independent vehicles in the recent window before applying a slowdown adjustment. Five vehicles can retain high confidence; three or four produce a moderate result. These rules keep one noisy bus from standing in for the corridor.

Machine-learning forecasts remain offline research until a temporal evaluation shows an improvement over the deterministic baseline. The comparison must use a time-aware split, the same input horizon and target definition, and a documented measure of error. A learned model does not qualify because it is larger or because its output looks smoother.

Consequences

The production answer can explain its evidence in SQL and in the response fields: baseline sample count, recent vehicle count, p50/p90 values, confidence, and fallback status. A missing baseline becomes visible uncertainty rather than an unmarked prediction.

The cost is that the first version is less ambitious. It cannot learn a pattern that the stored segment history does not contain. That is an acceptable ceiling until the forecast experiments show, on held-out future data, that the additional model and weight-delivery path buys a measurable improvement.

Read the forecast research README, the telemetry specification, and the bus tracker for the current evidence path.