Time Series and Forecasting

Apply fitted lag contributions

BOTIE

Take the dot product of the history window and lag weights, then add the intercept.
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

Take the dot product of the history window and lag weights, then add the intercept.

Botie has fitted coefficients for demand lags. Their meaning depends on retaining the older-to-newer order used during fitting.

Pair each lagged reading with its corresponding coefficient, sum the products, then add the fitted intercept.

Examples and results
Older-to-newer demand window
  1. 08
  2. 112
Lag coefficients in the same order
  1. 00.25
  2. 10.75
Fitted intercept
1
Required result
12
Older-to-newer demand window
  1. 04
  2. 18
Lag coefficients in the same order
  1. 00.5
  2. 10.5
Fitted intercept
1
Required result
7
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

This applies supplied coefficients for one horizon. It does not fit them or provide forecast intervals. Numerical tests allow a difference of 0.001. Lists and structures must also have the right shape.

The recent jump can reverse

This check uses the pieces from “Apply the fitted demand contributions”.

BOTIE

Botie's fitted rule uses the two most recent observations in oldest-to-newest order. Its negative weight on the newest observation allows a recent jump to reduce the next forecast. Apply the supplied coefficients and intercept.
Older-to-newer demand window
  1. 012
  2. 120
Lag coefficients in the same order
  1. 01.2
  2. 1-0.4
Fitted intercept
5

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.

Which saved details would let another person reproduce this forecast exactly?

Preserve coefficients, intercept, lag order, units, and the history available at the forecast origin.

This applies supplied coefficients for one horizon. It does not fit them or provide forecast intervals.

Work through the Python challenges →
Continue the courseTesting a Forecast as Time Moves Forward →
← Updating a Forecast Without Starting Over