regPath.SDTree {SDModels} | R Documentation |
Calculate the regularization path of an SDTree
Description
This function calculates the variable importance of an SDTree for different complexity parameters.
Usage
## S3 method for class 'SDTree'
regPath(object, cp_seq = NULL, ...)
Arguments
object |
an SDTree object |
cp_seq |
A sequence of complexity parameters. If NULL, the sequence is calculated automatically using only relevant values. |
... |
Further arguments passed to or from other methods. |
Value
An object of class paths
containing
cp |
The sequence of complexity parameters. |
varImp_path |
A |
type |
Path type |
Author(s)
Markus Ulmer
See Also
plot.paths
prune
get_cp_seq
SDTree
Examples
set.seed(1)
n <- 10
X <- matrix(rnorm(n * 5), nrow = n)
y <- sign(X[, 1]) * 3 + sign(X[, 2]) + rnorm(n)
model <- SDTree(x = X, y = y, Q_type = 'no_deconfounding', cp = 0.5)
paths <- regPath(model)
plot(paths)
plot(paths, plotly = TRUE)
[Package SDModels version 1.0.13 Index]