oob_predictions: Out-of-bag predictions of a fitted learner, when it exposes...

View source: R/helper_vimpute.R

oob_predictionsR Documentation

Out-of-bag predictions of a fitted learner, when it exposes them

Description

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.

Usage

oob_predictions(learner, n)

Arguments

learner

A trained mlr3 learner or GraphLearner

n

Number of training rows the predictions must align with

Value

Numeric vector of length n (possibly with non-finite entries for rows that were in-bag in every tree), or NULL


VIM documentation built on Sept. 2, 2026, 5:07 p.m.