hshrink {ranger}R Documentation

Hierarchical shrinkage

Description

Apply hierarchical shrinkage to a ranger object. Hierarchical shrinkage is a regularization technique that recursively shrinks node predictions towards parent node predictions. For details see Agarwal et al. (2022).

Usage

hshrink(rf, lambda)

Arguments

rf

ranger object, created with node.stats = TRUE.

lambda

Non-negative shrinkage parameter.

Value

The ranger object is modified in-place.

Author(s)

Marvin N. Wright

References

Examples

## Hierarchical shrinkage for a probablity forest
rf <- ranger(Species ~ ., iris, node.stats = TRUE, probability = TRUE)
hshrink(rf, lambda = 5)

[Package ranger version 0.17.0 Index]