ranger stores the out-of-bag predictions of the training rows on the fitted object, in training-row order and at no extra cost. They estimate the true predictive spread to within ~1% where the in-sample predictions understate it about twofold. Returns NULL whenever they are unavailable, misaligned, or too sparse to estimate a scale from, so callers fall back to their own path.
oob_predictions(learner, n)Numeric vector of length n (possibly with non-finite entries for
rows that were in-bag in every tree), or NULL
A trained mlr3 learner or GraphLearner
Number of training rows the predictions must align with