Live demo
A stream, two models, and a fat-finger button. The forecasters are the skaters JavaScript twin; the baseline is a port of river's recommended pipeline.
A signal x drives a target y. Both models predict y one step ahead, then learn, then move on. They see the same data.
- Baseline gets 13 raw numbers: the current x, four lags of x, and eight lags of y.
- Fronted gets 4 numbers: what its forecaster expected x to be and how surprising x turned out to be, and the same two for y. It never sees a raw value — the forecasters keep the history.
So the baseline has more history to work with. Press a button to corrupt a reading (six to ten sigma, as in the benchmark study). The baseline divides by a running mean and deviation, so the bad tick reaches the model at full size and skews those running statistics for a while. The fronted model sees a surprise value, which is capped near 7. On clean data the baseline is slightly ahead, by the amount the papers page reports.
The target, and what the forecaster expected
The surprise z of each arriving y
Near zero when the value was expected, capped at ±7.03 however extreme the reading.
Running MAE, last 400 ticks
Both models run at their defaults and see identical observations. The
corruption you inject is measurement error on the observed values, not on
the truth the errors are scored against. Source: this page and
docs/js/ice-skaters/index.mjs, dependency-free ES modules.