Predicts the response for the training data using only the trees in the SDForest that were not trained on the observation.

predictOOB(object, X = NULL)

Arguments

object

Fitted object of class SDForest.

X

Covariates of the training data. If NULL, the data saved in the object is used.

Value

A vector of out-of-bag predictions for the training data. #' set.seed(1) n <- 50 X <- matrix(rnorm(n * 5), nrow = n) y <- sign(X[, 1]) * 3 + rnorm(n) model <- SDForest(x = X, y = y, Q_type = 'no_deconfounding', nTree = 5, cp = 0.5) predictOOB(model)

Author

Markus Ulmer