man/rmd/rand_forest_aorsf.md

For this engine, there are multiple modes: censored regression, classification, and regression

Tuning Parameters

This model has 3 tuning parameters:

Additionally, this model has one engine-specific tuning parameter:

Translation from parsnip to the original package (censored regression)

The censored extension package is required to fit this model.

library(censored)

rand_forest() %>%
  set_engine("aorsf") %>%
  set_mode("censored regression") %>%
  translate()
## Random Forest Model Specification (censored regression)
## 
## Computational engine: aorsf 
## 
## Model fit template:
## aorsf::orsf(formula = missing_arg(), data = missing_arg(), weights = missing_arg())

Translation from parsnip to the original package (regression)

The bonsai extension package is required to fit this model.

library(bonsai)

rand_forest() %>%
  set_engine("aorsf") %>%
  set_mode("regression") %>%
  translate()
## Random Forest Model Specification (regression)
## 
## Computational engine: aorsf 
## 
## Model fit template:
## aorsf::orsf(formula = missing_arg(), data = missing_arg(), weights = missing_arg(), 
##     n_thread = 1, verbose_progress = FALSE)

Translation from parsnip to the original package (classification)

The bonsai extension package is required to fit this model.

library(bonsai)

rand_forest() %>%
  set_engine("aorsf") %>%
  set_mode("classification") %>%
  translate()
## Random Forest Model Specification (classification)
## 
## Computational engine: aorsf 
## 
## Model fit template:
## aorsf::orsf(formula = missing_arg(), data = missing_arg(), weights = missing_arg(), 
##     n_thread = 1, verbose_progress = FALSE)

Preprocessing requirements

This engine does not require any special encoding of the predictors. Categorical predictors can be partitioned into groups of factor levels (e.g. {a, c} vs {b, d}) when splitting at a node. Dummy variables are not required for this model.

Case weights

This model can utilize case weights during model fitting. To use them, see the documentation in [case_weights] and the examples on tidymodels.org.

The fit() and fit_xy() arguments have arguments called case_weights that expect vectors of case weights.

Other details

Predictions of survival probability at a time exceeding the maximum observed event time are the predicted survival probability at the maximum observed time in the training data.

The class predict method in aorsf uses the standard 'each tree gets one vote' approach, which is usually but not always consistent with the picking the class that has highest predicted probability. It is okay for this inconsistency to occur in aorsf because it is intentionally applying the traditional class prediction method for random forests, but in tidymodels it is preferable to embrace consistency. Thus, we opted to make predicted probability consistent with predicted class all the time by making the predicted class a function of predicted probability (see tidymodels/bonsai#78).

References



tidymodels/parsnip documentation built on Feb. 19, 2025, 2:10 a.m.