Classical Machine Learning

Grow trees with different views

BOTIE

Gather tree A's bootstrap rows, select its requested feature columns using a transpose and gather, then restore observation rows.
Ready to test
0 passed · 0 failed · 1 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

Gather tree A's bootstrap rows, select its requested feature columns using a transpose and gather, then restore observation rows.

If every tree sees the same information, their errors may be too similar to help one another. Let's prepare two different views of a specimen table by sampling rows and selecting measurements. This exercise builds the varied inputs; it does not fit the trees yet.

Inspect the component calculation
Swap rows and columns(
  Matrix: Gather selected entries(
    Data table: Swap rows and columns(
      Matrix: Gather selected entries(
        Data table: Specimen measurement rows
        Indices: Tree A sample indices
      )
    )
    Indices: Tree A feature indices
  )
)
Examples and results
Specimen measurement rows
110
220
330
Tree A sample indices
  1. 00
  2. 10
  3. 22
Tree A feature indices
  1. 00
Required result
1
1
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

This constructs resampled training views. A full forest chooses candidate features again at each split and later combines fitted tree predictions. 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 bootstrap sample with reordered feature columns

This check uses the pieces from “Return two separately specified tree views”.

BOTIE

Tree A requests the third feature before the first, while Tree B uses only the second feature. Predict both sampled tables, keeping repeated row requests.
Specimen measurement rows
110100
220200
330300
440400
Tree A sample indices
  1. 03
  2. 11
  3. 23
Tree B sample indices
  1. 00
  2. 12
  3. 22
Tree A feature indices
  1. 02
  2. 10
Tree B feature indices
  1. 01

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 variation comes from row sampling and what comes from feature selection? How does a full forest's split-by-split feature choice go beyond these views?

Preserve each estimator's sampling choices separately before fitting and aggregating an ensemble.

This constructs resampled training views. A full forest chooses candidate features again at each split and later combines fitted tree predictions.

Work through the Python challenges →
Continue the courseGradient Boosting →
← Bagging