plotOOB | R Documentation |
This function visualizes the out-of-bag performance of an SDForest for different complexity parameters. Can be used to choose the optimal complexity parameter.
plotOOB(object, sqrt_scale = FALSE)
object |
A paths object with loss_path |
sqrt_scale |
If TRUE the x-axis is on a square root scale. |
A ggplot object
Markus Ulmer
regPath.SDForest
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.