plotOOB {SDModels} | R 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 |
sqrt_scale |
If TRUE the x-axis is on a square root scale. |
Value
A ggplot object
Author(s)
Markus Ulmer
See Also
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)
[Package SDModels version 1.0.13 Index]