Learn machine learning · part 5 · session 6
Beat the forest
The network against the Part 3 forest, on the same rows, the same split and a fixed budget of three thousand steps. The gate does not ask you to win. It asks you to report both numbers and ship the better model with a reason that matches them.
After this session you will be able to train a network on tabular data and say honestly when a forest is the better thing to ship.
The gate: a cell that reaches 0.80 validation inside the budget, both held-out numbers recorded, and a shipping decision the numbers support.
01 · The question
You have a network that solves XOR, you have chosen its activations and you have set it up properly. Now put it against the from Part 3 on the same rows, the same split and a fixed budget of three thousand steps.
I trained all eighteen combinations of width, learning rate and regulariser once and shipped the runs, so you pick a cell and press play rather than leave your phone grinding. Predict the cell before you play it. That is the work. On this synthetic data most of the eighteen cells finish behind the forest and the best one can edge past it, so the session is not rigged either way. The gate does not ask you to win. It asks you to report both numbers and ship the better model with a reason that matches them. Commit first: which model ends with the higher held-out accuracy, and by how much.
The data and the split
syntheticloan seed 7, 2,000 rows1,200 training rows, 400 validation rows, 400 test rows, split once at seed 7. The test rows pick nothing: they are scored once, in the held-out block. Nothing in this generator is calibrated to real lending, and the amounts are synthetic.
02 · Predict
Before anything runs
Higher held-out accuracy, and the margin.
Choose a model first.
03 · Try it
1 and 2 · pick a cell, predict it, then play it
Three piles of rows
syntheticloan seed 7, the split the recorder usedBudget 3,000 steps, recorded
Loading the recorded grid.
Cells played to the last step: 0 of 18. Predictions recorded: 0.
3 · read the forest
The opponent from Part 3
50 trees, max-features 3 of nine, bootstrap on, depth capped at 8, at least 5 rows per leaf, seed 7. It is grown on the same 1,200 training rows and scored on the same 400 test rows as the recorded cells.
4 · open the held-out block
This opens the test rows for one cell. It is pressable once per cell, and the count carries on from 1.3. Selection has already happened on the validation rows, so this number is a report, not a control.
Opened: 0 cells. Peeks recorded in the notebook: 0.
It opens once the current cell has been played to its last step and the forest has been read.
5 · choose and justify
Both held-out numbers have to be on the page first.
Ask for a hint
Rungs open as you run the session, not as time passes. You have run it 0 times.
1. A question: available after 3 evaluated runs.
2. A narrowing: available after 5 evaluated runs.
3. A worked fragment on a different tabular task: available after 7 evaluated runs.
4. The answer: available after 9 evaluated runs.
04 · Compare
05 · Check your understanding
Your check: reach the stated target
not yetAll three of: a cell that reached at least 0.80 validation accuracy inside one 3,000-step budget, both held-out numbers recorded, and a shipping choice that names the model with the higher held-out accuracy for a reason the numbers support. Choosing the forest passes.
Not met yet. Keep working the session.
- Best validation accuracy among the cells you played: no cell played yet
- Both held-out numbers on the page: not yet
- The decision: not recorded yet
Save your takeaway
Your takeaway
Edit it into your own words, or keep the line as it is.
This artifact holds the shipped cell's own parameters, int8 with one scale per matrix, the column list and the standardisation the recorder used, and both sets of held-out numbers. That is enough for a later session to encode a fresh row and run this network forward on it.