Model evaluation, thresholds and explanations.
The Inference Lab lets students examine a trained model, measure its performance on a defined set of examples, change a decision threshold and investigate individual predictions. The aim is a judgement supported by evidence.
Name the model and the examples being scored.
A useful evaluation identifies which model produced the answers and which labelled examples were used to check them. The lab shows model and dataset context, including recorded limits, before students judge the results.
For supported tabular activities with a reserved test cohort, the Inference Lab uses that cohort. Where independent test data is unavailable, it must distinguish a validation cohort from a test cohort. Image inference currently uses validation images, as explained in the image-evaluation limits.
A compatible student-trained tabular run can be taken forward from ML Lab for evaluation. Otherwise the activity uses its supplied model. The lesson and the data determine which cases and controls are available.
Changing the rule does not retrain the model.
For a classification task, the threshold determines when the model's score is high enough to flag a case. Moving the threshold changes which cases are flagged. It does not change the model's learned weights or fit.
| Outcome | What happened | Question for students |
|---|---|---|
| Correct detection | A case in the flagged class was flagged. | Which examples are being found? |
| Missed case | A case in the flagged class was not flagged. | What is the cost of missing it? |
| False alarm | A case outside the flagged class was flagged. | What is the cost of investigating it? |
The lab lets students inspect mistakes and near misses instead of relying on an overall result. As an illustrative example, a classifier that always predicts the majority category can be 90% accurate in a dataset with 90% majority examples while missing every minority example. This is an explanation of the metric, not a measured ML4Schools result.
Separate sensitivity from correctness.
In tabular activities, students can change an offered input and ask the same model for another answer. Image activities can offer transformations such as blur or brightness. These experiments examine how the prediction responds to the input.
A change that flips a prediction can be important without being realistic. Students still need to ask whether the modified values could occur together and whether they are within the kind of data the model was built for.
New data gives a fresh prediction. Without a known correct label, it does not give an accuracy measurement. The lab's prediction and the student's explanation should keep that difference visible.
Explanations describe model behaviour, not causes.
For supported tabular classifiers, the explanation can replace one input at a time with a reference value based on training data, then measure how the selected class score changes. It helps students see which features pulled the model towards that answer relative to that reference.
This feature-replacement method is not a causal experiment on the real world. Feature interactions and the choice of reference matter; the displayed contributions do not have to add up to a complete explanation.
Supported dense networks can also expose their trained structure and weights. Compatible image models can show activation and saliency information. These views depend on the model architecture and on what the activity makes available.
Scores also mean different things across model families. A KNN score reflects neighbour votes. An SVM score reflects its separating boundary and is not a measured probability. A neural-network score also needs evidence before it can be interpreted as a reliable real-world likelihood.
State the claim and its limits.
A defensible verdict identifies the cases tested, the threshold chosen, the mistakes observed and the intended use. It also names situations the evidence has not established.
- Which kinds of errors matter most for this task?
- What changed when the threshold moved, and what did not?
- Does an explanation describe a model response or establish a real-world cause?
- What additional independent evidence would be needed before wider use?
For numeric targets, regression is a different task: error in the target's units is more useful than a classification threshold. For the classroom context, explore comparing rules and models in Tooth Detective.
Connect the judgement to the assigned work.
ML4Schools connects evaluation activities with structured learning and teacher review of submitted work. Consider how students are asked to explain a threshold, investigate an error and justify a verdict. Free curricula also provide assessment and progress tools; the distinction to evaluate is the complete experiment and school workflow you receive.
Read the sourced comparison with free AI teaching options and see when each approach may fit.