A camera that said no crack to every mug on the line would have been right about 864 of last week's 900. The one Nkechi Obi actually installed at the ceramics works in Stoke was right about 880. Sixteen mugs of difference is the entire value of the machine, and the single number both figures are quoted in is the one that hides it.
Of the 900 mugs, 36 really had a hairline crack. The camera flagged 40. Which is where the useful reading starts, because two numbers that sound alike, 880 right and 864 right, describe a working inspection and a piece of cardboard.
The two mistakes, counted apart
Take the 40 flags first. 28 of them were genuinely cracked and 12 were mugs that were fine, pulled off the line and looked at for nothing. That leaves 8 cracked mugs the camera passed, and 852 sound mugs it correctly let through.
One week on the line
The same 900 mugs, split by which mistake was made
Three cells are cheap and one is not. A single accuracy figure adds all four together and reports the sum.
the mug was sound
the mug was cracked
The bottom left cell is the only one worth a decision, and it is the smallest number on the figure. Anything that reports one score has averaged it away.
Interactive Practice Lab
Edit and run this snippet directly in your browser (zero setup)
prompts = [ {"role": "tutor", "tokens": 42, "grounded": True}, {"role": "reviewer", "tokens": 68, "grounded": True}, {"role": "vague", "tokens": 14, "grounded": False},]valid = [p for p in prompts if p["grounded"]]print(f"Grounded prompts: {len(valid)}/{len(prompts)}")print("Avg tokens:", round(sum(p["tokens"] for p in valid) / len(valid), 1))Live LLM Temperature, Top-P & Softmax Sampling Lab
Tune Temperature and Nucleus Top-P to see live Softmax probabilities and sample tokens.
Count the two mistakes separately, because they do not cost the same. A false flag costs somebody twenty seconds at a bench. A missed crack costs a glaze, a firing, a box, a courier and a customer who now knows something about the works that Nkechi would rather they did not. Accuracy on a rare event is a number the do-nothing model almost matches, and it matches it by being right about the 864 mugs nobody was ever worried about.
The habit this builds is the one that transfers. Before any model exists, write down what each of the two mistakes costs, in the units the business actually uses. That number decides where the threshold goes, and the threshold is the only knob most projects genuinely need.

A model learns the label you wrote down
The 36 came from somewhere. Two inspectors marked up four weeks of photographs, and on a sample of 60 they disagreed with each other about nine. A model learns the label you wrote down, not the thing you meant, so the camera has been trained to reproduce a judgement that two experienced people make differently about one mug in seven.
Label agreement
The model ceiling is set by human agreement
Training reproduces the label written down, so disagreements between inspectors become the hard ceiling on performance.
- Raw photographsFour weeks of line capture
- Independent inspectionTwo inspectors scoring separately
- Disagreement zoneSubjective edge cases on hairline definition
- Consensus ruleA written two-line definition that aligns judges
No architecture change can lift accuracy beyond the consistency of the training labels.
That is not an argument against doing it. It is the reason the ceiling exists, and knowing where the ceiling is stops a team spending a quarter on architecture when the return was in writing a two-line definition of hairline and having both inspectors re-mark the disagreements. The three kinds of learning, and which fits your problem is where this gets decided, and it is decided before any of the rest.
The old methods still win on a table
Nkechi's second problem was a spreadsheet: which kiln loads come out with the most seconds, from firing temperature, clay batch, humidity, shelf position and time of year. Rows and columns, about eleven thousand of them.
Tabular methods
Why gradient boosting still beats networks on rows
On structured spreadsheets, gradient boosting trains in seconds and provides explicit column attribution without pre-scaling.
- Fast trainingTrains in seconds on a standard laptop
- Column attributionIdentifies directly which variable drove each kiln prediction
- Unscaled featuresAccepts raw tabular numbers without standardisation
- Tabular accuracyOutperforms multi-layer networks across tabular records
- Fast trainingTrains in seconds on a standard laptop
- Column attributionIdentifies directly which variable drove each kiln prediction
- Unscaled featuresAccepts raw tabular numbers without standardisation
- Tabular accuracyOutperforms multi-layer networks across tabular records
Complex deep architectures earn their keep on image feeds and audio, not on tabular kiln spreadsheets.
On a table of rows, gradient boosting still beats a neural network, and it has done for about a decade. It trains in seconds on a laptop, it says which column carried the decision, and it does not need the data standardised first. The methods that still win on tabular data are the default here and the interesting alternative is the wrong first move, which is worth saying plainly because almost nothing published in the last five years says it. Layers of weights, and what training adjusts earns its place on images, on audio and on text, which is exactly what the camera on the line is doing.
The split decides whether any of it was true
The kiln model scored beautifully and then lost most of it in the works. The rows had been shuffled and cut at random, so a firing from March was scoring a firing from the following week using clay batches it had already seen.
Temporal validation
Splitting across time rather than at random
When predicting tomorrow, testing on shuffled rows leaks future information. A chronological split shows what the factory floor actually encounters.
- Past firingsTraining windowHistorical kiln loads up to the split boundary
- Cutoff dateTemporal splitStrict chronological boundary preventing future leaks
- Future firingsTest evaluationUnseen firings scored without access to future batches
- Production driftRetraining triggerSupplier changes and kiln relining degrade the unrefreshed model
A valid split produces lower validation scores that match live production reality.
Split by time, not at random, whenever tomorrow is what you are predicting. Train on everything up to a date, test on what came after it, and the number that comes out is the number the works will get. It will be worse, and it will be true, and the second property is what makes it worth having.
The same clock keeps running after the launch. A model that is not retrained is a model of last year: the clay supplier changes, the kiln is relined, and the thing quietly gets worse without a single error appearing anywhere. Watching for that is the subject of the part after the notebook.

The camps are not evenly spaced
The first three camps here take an afternoon, a week and a month. The last one takes longer than all of them together, and no reading list draws it that way. The libraries the work is actually done in is a day's orientation that people spend a fortnight on, because it feels like progress and it is legible.
The order
The last camp is further than the first three together
An afternoon, a week, a month, and then a year. Reading lists draw these as five equal chapters, and the ground is not flat.
- 01The shape of the fieldWhich of the three kinds your problem is. An afternoon
- 02A classic model on a tableA week, and often where the project correctly ends
- 03Neural networksA month, and mostly in order to know when not to
- 04Images, or words and soundA season each, and a different craft each way
- 05Putting it to workLonger than all of them, and almost none of it is modelling
The steepness is the claim and nothing else here is. The camps are not stages; a team can stop at the second one and have finished.
Taken backwards, the field is a menu of architectures, and the reader who starts at getting a machine to read an image or at models over words and sound learns to build something impressive that cannot be checked, because the cost of the two mistakes was never written down and the split was never right.
The stall is the notebook that worked
People stop here at a number in a notebook. The score is good, the plots look right, and the work feels finished, because every convention of the field treats a validated model as the deliverable. Nothing about the notebook is wrong. It is just that the notebook was the afternoon and the works is the year.
Production path
The prediction is only complete when the line acts on it
A validated score in a notebook is an afternoon of math. Production begins when the physical works alters its behaviour.
- 01Generate line scoreThe validation metric passes on held-out data
- 02Route prediction to lineSignal reaches the conveyor controller in real time
- 03Hold mug for inspectionThe four-second physical pause on the belt
- 04Human visual verdictInspector confirms or overrides before glazing
- 05Fall-through on outageManual backup routing when the inference camera fails
If the failure fallback and operator reaction are undefined, the model is not in production.
The tell is specific and easy to check on yourself: if you cannot say what happens to a prediction after it is made, who sees it, what they do differently, and what happens on the day the model is unavailable, then the model is not in production regardless of where it is running. Nkechi's camera holds a mug on a conveyor for four seconds and a person looks at it, which is a sentence about the works and not about the model, and it is the sentence the project was actually for.

What to open in 2026
scikit-learn is the default toolbox as of 2026, free and open source, and it replaced writing the fitting loop and the cross validation by hand. Its real contribution is that the split, the fit and the scoring have one shape across every method, which is what makes swapping a model a two-line change instead of a rewrite.
Tooling stack
The modern ecosystem splits by data surface
Fitting loops and static graphs have been replaced by standard interfaces tailored to tabular records or vision streams.
- scikit-learnUnified fit, split, and score interface across tabular models
- XGBoost and LightGBMFast gradient boosting baselines for spreadsheet tables
- PyTorchDynamic graphs for vision models on the camera feed
- Raw data pipelineCollection, cleaning, and human labelling of line photographs
No tool choice fixes unlabelled or inconsistently gathered input data.
XGBoost and LightGBM are the gradient boosting libraries, free and open source as of 2026, and between them they replaced reaching for a neural network on a spreadsheet. Either one on the kiln table, with the columns left as they are, is an hour of work and the honest baseline every later model has to beat.
PyTorch is where the network on the camera is written, free and open source as of 2026, and it replaced the static graph you had to compile before you could print anything inside it, which is what tutorials older than about 2019 still show.
Which leaves the question the whole page rests on and never answers. Every number here came from the 900 mugs and the four weeks of photographs, and none of it says how those rows were collected, who decided what counted as one, or what happened to the weeks that were thrown away. That is getting it, cleaning it, and finding out what it says, and it is the half of this subject that decides the other half. Where the labels are people's own work, it stops being a technical question, which is where it actually changes the job.