Data Preparation

Fill a greenhouse report from its training reference

BOTIE

Select the nonmissing training temperatures and calculate their mean.
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

Select the nonmissing training temperatures and calculate their mean.

Botie's report has absent temperatures. Learn a replacement from observed training readings, then fill only the missing report entries.

Inspect the component calculation
Mean(
  Numbers: Keep observed readings(
    Readings with possible blanks: Training temperatures
  )
)
Examples and results
Training temperatures
  1. 010
  2. 1null
  3. 214
Required result
12
Training temperatures
  1. 02
  2. 14
Required result
3
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

Mean replacement is a baseline. It cannot recover the true missing values or represent uncertainty about them. 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.

Both new thermometers failed to report

This check uses the pieces from “Fill only the absent report entries”.

BOTIE

Every value in the new report is absent. Predict the filled report using only observed training temperatures. Keep the new report out of the fitted reference.
Training temperatures
  1. 08
  2. 1null
  3. 214
  4. 320
New greenhouse report
  1. 0null
  2. 1null

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 evidence distinguishes an observed temperature from a filled one, and why should the filled value not be treated as known truth?

Fit an imputation rule on training data, preserve observed values, and retain awareness of missingness.

Mean replacement is a baseline. It cannot recover the true missing values or represent uncertainty about them.

Work through the Python challenges →
Continue the courseCentring on the Mean →
← What Does One Row Represent?