stabilitySelection.SDForest: Calculate the stability selection of an SDForest

View source: R/paths.R

stabilitySelection.SDForestR Documentation

Calculate the stability selection of an SDForest

Description

This function calculates the stability selection of an SDForest \insertCiteMeinshausen2010StabilitySelectionSDModels. Stability selection is calculated as the fraction of trees in the forest that select a variable for a split at each complexity parameter.

Usage

## S3 method for class 'SDForest'
stabilitySelection(object, cp_seq = NULL, ...)

Arguments

object

an SDForest 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 matrix with the stability selection for each complexity parameter.

type

Path type

Author(s)

Markus Ulmer

References

\insertAllCited

See Also

plot.paths regPath prune get_cp_seq 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', nTree = 2, cp = 0.5)
paths <- stabilitySelection(model)
plot(paths)

plot(paths, plotly = TRUE)


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