Choosing and Checking a Model
Keep preparation tied to the training data
BOTIE
Examples, experiments and workspace controls
Connect a tool's inputs to see what it produces. You can try a branch before connecting it to Result.
Try your own inputs
Change a held-out reading and inspect the centring reference. Should test data be able to change a reference fitted on training data? Follow the two sources separately to check your construction.
Context for this challenge
Compute the training mean, then subtract it from the held-out reading vector.
A prediction for a new observation needs the same preparation used during training. We will learn a centring reference from the training rows, apply it to reserved observations, and then use the fitted model. The reserved values must not help set their own reference.
Inspect the component calculation
Subtract(
Starting value: Held-out readings
Value to remove: Divide(
Amount: Add a list(
Numbers: Training readings
)
Divisor: Count items(
Items: Training readings
)
)
)Examples and results
- Held-out readings
- 07
- 19
- Training readings
- 02
- 14
- 26
- Required result
- 03
- 15
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 is a small construction problem. The lesson explains the assumptions and the parts of the full method that this example leaves out. Numerical tests allow a difference of 0.001. Lists and structures must also have the right shape.
Your last tested pieces can start the full construction. An existing draft there keeps its own pieces.
A pipeline with a negative fitted weight
This check uses the pieces from “Feed prepared readings into the fitted rule”.
BOTIE
- Training readings
- 010
- 114
- 218
- Held-out readings
- 08
- 114
- 220
- Fitted weight
-2
- Fitted bias
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.
If you repeated this evaluation across folds, which quantity must be refitted inside each fold and which rows must it exclude?
Treat data preparation as part of fitting, then repeat the full fit within each validation split.
This is a small construction problem. The lesson explains the assumptions and the parts of the full method that this example leaves out.
Work through the Python challenges →