1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hshrink.R
\name{hshrink}
\alias{hshrink}
\title{Hierarchical shrinkage}
\usage{
hshrink(rf, lambda)
}
\arguments{
\item{rf}{ranger object, created with \code{node.stats = TRUE}.}
\item{lambda}{Non-negative shrinkage parameter.}
}
\value{
The ranger object is modified in-place.
}
\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).
}
\examples{
## Hierarchical shrinkage for a probablity forest
rf <- ranger(Species ~ ., iris, node.stats = TRUE, probability = TRUE)
hshrink(rf, lambda = 5)
}
\references{
\itemize{
\item Agarwal, A., Tan, Y.S., Ronen, O., Singh, C. & Yu, B. (2022). Hierarchical Shrinkage: Improving the accuracy and interpretability of tree-based models. Proceedings of the 39th International Conference on Machine Learning, PMLR 162:111-135.
}
}
\author{
Marvin N. Wright
}
|