Time Series and Forecasting

Measure the persistence forecast's errors

BOTIE

Subtract predictions from observations, take absolute values, and average the errors.
Ready to test
0 passed · 0 failed · 2 not run

An empty floor. Start with the information your machine needs.

Received result

Your answer will arrive here.

Examples, experiments and workspace controls
Live values

Connect a tool's inputs to see what it produces. You can try a branch before connecting it to Result.

Try your own inputs

Use a copy of the example to try your own data. Keep the problem's assumptions in mind, and predict the effect of a change before checking the output. You can also add another branch to compare two ways of doing the calculation.

Start at an output arrow, then click or drag to an input. Drag empty space to pan. Delete removes a selection. Ctrl/Cmd+Z undoes a change.
Context for this challenge

Subtract predictions from observations, take absolute values, and average the errors.

Botie saved yesterday's demand as a forecast. Later observations now let him measure its errors on matching target dates.

Subtract each stored prediction from its matching observation, take absolute values, then average across dates.

Examples and results
Previously recorded forecasts
  1. 010
  2. 112
  3. 211
Later observed litres
  1. 012
  2. 111
  3. 214
Required result
2
Previously recorded forecasts
  1. 09
  2. 19
Later observed litres
  1. 09
  2. 19
Required result
0
Try a fresh construction

This clears this draft, including its undo history. Earlier successful attempts stay recorded. Build again without opening hints to record an independent attempt.

Stuck? Inspect a worked construction

The tools below form one possible solution. You can assemble it, follow its signals, and undo that change to return to your own construction.

Assumptions and test precision

These are supplied historical forecasts. This calculation does not fit a model or estimate uncertainty. Numerical tests allow a difference of 0.001. Lists and structures must also have the right shape.

The quiet day and the busy day

This check uses the pieces from “Measure the saved persistence forecasts”.

BOTIE

Botie's baseline predicts the next four days of orders in chronological order. One day is unusually quiet and another unusually busy. Measure the mean absolute error in orders, giving every day equal weight.
Previously recorded forecasts
  1. 018
  2. 118
  3. 218
  4. 318
Later observed litres
  1. 018
  2. 112
  3. 225
  4. 317

Use a number, text, or an array matching the requested result. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.

Build a construction in the workspace above first. This case will test those pieces.

What date information must stay beside each forecast before its error can be trusted?

A forecast is an earlier recorded prediction paired with a later target, not a fitted explanation of a known outcome.

These are supplied historical forecasts. This calculation does not fit a model or estimate uncertainty.

Work through the Python challenges →
Continue the courseBuilding Inputs From Earlier Days →
← Evaluating Generative Models