DOCUMENTATION

Score a new batch of data

You have a trained model and a file of rows to predict. Here is the gesture, and what LabML checks before accepting.

This assumes you have already trained a model. If not, start with the tutorial.

The gesture

  1. Below the leaderboard, open Score a new batch.
  2. Drop the file — CSV, TSV or Excel.
  3. Predictions appear row by row, exportable as CSV.

Train iris to try it with iris-field.csv

## What LabML checks before accepting

The file must carry the columns the model expects. If any are missing, LabML refuses and names them (missing-columns) rather than predicting over absent features.

Extra columns are ignored without noise: a production export often carries identifiers the model never needed.

The batch is read like the training file was, under the same memory budget. A batch past 20 million cells is refused (too-large) rather than read whole.

If the file contains the real answer

Then LabML does not merely predict: it compares, and shows the same metrics as the leaderboard.

This is the most useful production gesture — checking that a model still holds on data it has never seen. Whether a gap against the test score is a real drop or the draw of a small batch is what the production check below settles.

The production check

Every scored batch is read against what the model was trained on, and the panel gives one verdict with its three signals.

Signal Question Needs
Columns do the inputs still look like the training rows? nothing more
Answers does the model still answer the way it did? nothing more
Performance is it wrong more often? the target column in the file
Verdict When
Stable nothing can be told from the draw
Watch columns or answers moved, and the performance did not measurably drop, or could not be measured
Retrain on the labelled rows, the drop is outside its interval

Two rules, stated on the panel:

  • a drift is a reason to look, a measured drop is a reason to retrain. Without labels the verdict stops at « watch », and asks for labels;
  • a drift counts only when it can be told from the draw. Each PSI is read against its own noise ceiling: the value it stays under, 95 checks in 100, when the batch and the reference are two draws of the same data at these sizes. The usual fixed thresholds (0.1 and 0.25) read a small batch as a drift: on the lab's demos they raised a strong alert on 8 to 78 % of 100-row batches in which nothing had moved, and on nearly all 30-row ones.

A model re-imported from a file carries its reference with it (format 5). An older export has none: the panel says so, and checks the batch on its labels alone.

A submission file for a competition

A competition hands out a file with no label and expects one back with two columns under its own names, PassengerId,Survived. The scored CSV carries every original column: the right file to join back into a system, the wrong one for a platform. Under the scored batch, the Submission file block reduces it to an identifier and a prediction.

The lab knows neither the platform nor its rules, so you name everything.

You choose What it is
The identifier column one column of the scored file, or « number the rows from 1 ». The lab points at a column that reads as an identifier, and does not choose it for you
The two column names exactly what the platform expects
What a prediction is the class by name, the probability of the second class (binary), one probability per class (three classes or more), or the value (regression)
Which model predicts the measured model, or the same family fitted again on every labelled row

The file keeps every row of the scored file, in its order. A row whose identifier is empty or repeated is written and counted, never dropped: a platform would refuse it, and you should know before it does.

Fitting again on every row

A run fits on 64 % of the labelled rows and keeps the rest to choose (16 %) and to measure (20 %). Once that is done, a prediction for unlabelled rows can use all of them. The price is that the refitted model has no test set left: its score is the one of its sibling fitted on fewer rows.

Whether it pays was measured before the option was built, on the six demos, ten splits each, with a quarter of the rows kept away from both models:

Demo Labelled rows Mean gain on the rows kept away Better / worse
reviews 180 +5.0 accuracy points 51 / 11 of 70
mpg 298 RMSE down 3 % 47 / 13 of 60
energy 180 RMSE down 2 % 44 / 16 of 60
titanic 668 +0.8 accuracy point 41 / 20 of 70
fraud 480 none 21 / 25 of 70
iris 112 none 14 / 17 of 70

The gain follows the learning curve, not the size of the file: iris is the smallest demo and gains nothing, because its curve is already flat. So the refit is offered and never the default, and the block says which model predicted the file. The blend cannot be refitted: its members are picked on the validation rows.

What a submission is not

It is not a score. The lab does not know the platform's metric nor its private rows, and promises no rank. And a public leaderboard wears like a test set: each submission you compare to keep the best one is a choice made with it, the same effect the test-set ledger counts inside the lab.

The decision columns

If the scored model carries a multiclass decision rule — frozen in the lab, then exported with it — the produced CSV gains two columns:

Column Contents
policy_decision The class the rule settled on, or an empty cell when the rule abstained.
decision_status decided or abstained.

The predicted column stays the model's raw prediction. The two decision columns do not replace it: they say what the rule chose to do with it. An abstained row is a case to route to human review, not a model error.

With no rule attached to the model, these columns do not appear at all.

Cells filled in the scored file

A scored file is filled the way the training rows were: a missing number takes the training median, a missing category the most frequent training one. The result says how many cells of each column that was, so a file that arrives half empty in a column the model relies on does not pass in silence.

Labels never seen

If your batch contains a class absent from training, LabML still predicts it but excludes it from the metrics, announcing how many rows are affected. The model cannot predict a class it never met; counting it in accuracy would distort it.

Where to go next