plotOOB: Visualize the out-of-bag performance of an SDForest

View source: R/paths.R

plotOOBR Documentation

Visualize the out-of-bag performance of an SDForest

Description

This function visualizes the out-of-bag performance of an SDForest for different complexity parameters. Can be used to choose the optimal complexity parameter.

Usage

plotOOB(object, sqrt_scale = FALSE)

Arguments

object

A paths object with loss_path matrix with the out-of-bag performance for each complexity parameter.

sqrt_scale

If TRUE the x-axis is on a square root scale.

Value

A ggplot object

Author(s)

Markus Ulmer

See Also

regPath.SDForest

Examples

set.seed(1)
n <- 10
X <- matrix(rnorm(n * 5), nrow = n)
y <- sign(X[, 1]) * 3 + sign(X[, 2]) + rnorm(n)
model <- SDForest(x = X, y = y, Q_type = 'no_deconfounding', cp = 0.5)
paths <- regPath(model)
plotOOB(paths)

SDModels documentation built on April 11, 2025, 5:50 p.m.