MolBasis
held-outin-samplereportingvalidationqspr5 min read

Held-out or in-sample, which model figure to quote in a report

Quote the held-out figure first, name the split and the number of molecules, and give the in-sample figure as a secondary value with its own label.

Updated November 28, 2026

Quote the held-out figure. Say which split produced it, how many molecules it rests on and what baseline it beats, then give the in-sample figure as a secondary value under its own label. A report that leads with the in-sample number tells the reader how well the model remembers, not how well it predicts, and the two can differ by a lot on a small dataset.

What each figure measures

An in-sample figure, sometimes called a training or fitting figure, compares predictions with measurements for the molecules the model was fitted on. Pearson r, MAE or R² computed this way describe how closely the equation follows the points it was built to follow. A held-out figure uses molecules the fit never saw. For a MolBasis kernel, that means 25 percent of the Bemis-Murcko scaffolds set aside before any fitting, with the coefficients refitted on the remaining 75 percent. The guide on in-sample versus held-out treats the distinction in full.

The gap between the two is not noise. Every free choice in a model, from coefficients to the descriptor a search selected, was made to reduce error on the training molecules. Those molecules therefore show less error than fresh ones, by an amount that grows with the number of choices and shrinks with the number of molecules. Golbraikh and Tropsha made this point in 2002 for cross-validated q², and it holds for any statistic computed on data that shaped the model.

A small fit with both figures computed

Five training points make the effect visible. Let x take the values 1, 2, 3, 4 and 5 and y the values 2.0, 4.1, 5.9, 8.2 and 9.8. The means are 3 and 6.0. The slope is the sum of the products of the x deviations and the y deviations, 19.7, over the sum of the squared x deviations, 10, so 1.97. The intercept is 6.0 − 1.97 × 3 = 0.09.

The in-sample predictions are 2.06, 4.03, 6.00, 7.97 and 9.94. The absolute residuals are 0.06, 0.07, 0.10, 0.23 and 0.14, so the in-sample MAE is 0.60 over 5, which is 0.12.

Now two held-out points arrive, x = 7 with y = 14.9 and x = 8 with y = 15.5. The line predicts 13.88 and 15.85. The residuals are 1.02 and 0.35, and the held-out MAE is 0.69, nearly six times the in-sample value. The line was never wrong on the five points it was drawn through. It is wrong where it has to predict. Two held-out points also make a figure that would change completely if one of them moved, which is why the number of held-out molecules belongs next to the figure.

When the in-sample figure is worth quoting

It is worth quoting as a secondary value, with a label that says what it is. An in-sample figure gives an upper bound on what the model form can reach on this data. If the in-sample r is low, the equation underfits and no amount of held-out testing will rescue it. If the in-sample r is high and the held-out r is low, the fit has adapted to its training set and the search has probably picked up noise. Reading the two together is a diagnosis. Reading the first alone is a mistake.

MolBasis shows this order on every kernel page. The held-out result comes first with the number of molecules it rests on. The in-sample figure follows as a secondary value. The methodology page states that the split is one 25 percent scaffold-blind split with a single seed and no confidence interval, and the guide on reading a kernel page walks through the layout.

What a held-out figure needs beside it

A held-out number without context is only half a claim. Four things belong next to it.

  1. The split. A random split with near-duplicates on both sides is close to in-sample. A scaffold-blind or time split is a stronger test.
  2. The count. The 25 percent in a scaffold split is a share of scaffolds, not of molecules, so the held-out set can be small. Quote the number of molecules.
  3. The seed or the repeats. One split with one seed is one draw from a distribution of possible figures. Say so, or report the spread over repeats.
  4. The baseline. A held-out r means more when the MAE is also compared with a model that predicts the training mean, as the guide on what a 30 percent MAE lift means explains.

The one rule that supersedes all of these is that the held-out set must not have been used to select the model. If several equations were compared on the held-out molecules and the best was kept, the held-out figure has become an in-sample figure for the selection step. Tropsha and colleagues described this leak in 2003, and the kernels avoid it by letting the gate select the equation on the 75 percent before the held-out set is touched.

A sentence you can reuse

When you write up a model, one template covers both figures without ambiguity. Held-out Pearson r of a given value on a given number of molecules from a scaffold-blind split with one seed, MAE a given percentage below the train-mean baseline. In-sample r of another value, given for reference. The reader then knows what was tested, on how much, and what the model remembers versus what it predicts.

Key points

  • Lead with the held-out figure, the split that produced it and the number of molecules it rests on.
  • Give the in-sample figure second, clearly labelled, as an upper bound and a diagnosis of underfitting.
  • The gap between the two measures how much the fit and the search adapted to the training data.
  • A held-out set used to choose among models has become a training set for that choice.
  • One split with one seed is one draw, and small held-out sets make unstable figures.

Questions people ask

Why is the in-sample figure always better than the held-out one?
Because the coefficients and the choice of descriptors were tuned on those molecules. The fit has already seen them, so its errors on them are smaller than on molecules it never saw. The gap between the two figures is a direct measure of how much the fit adapted to its training set.
Is an in-sample r useless then?
No. It gives an upper bound on what the model form can do and shows underfitting when it is low. It should never be quoted alone or without its label, and it should never be used to rank models that were selected on the same data.
What must accompany a held-out figure?
The kind of split, such as scaffold-blind or time-based, the number of held-out molecules, the seed or the number of repeats, and the baseline the model is compared against. A held-out r on a dozen molecules is a different claim from the same r on five hundred.
What does MolBasis quote?
Each kernel page shows the result on a 25 percent scaffold-blind split as the headline, the number of held-out molecules it rests on, and the in-sample figure as a secondary value. The site states that this is one split with one seed and no confidence interval.

Further reading

In practice: This site makes no comparison with another method on the same molecules, because no controlled comparison exists. The guides compare methods on their principles, not on numbers.

See the kernels themselves

Every kernel is shown with its held-out result, the number of molecules it rests on and what it cannot be trusted for.