#| child: aaa.Rmd
#| include: false

r descr_models("rand_forest", "partykit")

Tuning Parameters

#| label: partykit-param-info
#| echo: false
defaults <- 
  tibble::tibble(parsnip = c("trees", "min_n", "mtry"),
                 default = c("500L", "20L", "5L"))

param <-
  rand_forest() |> 
  set_engine("partykit") |> 
  set_mode("regression") |>  
  make_parameter_list(defaults) |> 
  distinct()

This model has r nrow(param) tuning parameters:

#| label: partykit-param-list
#| echo: false
#| results: asis
param$item

Translation from parsnip to the original package (regression)

r uses_extension("rand_forest", "partykit", "regression")

#| label: partykit-creg
library(bonsai)

rand_forest() |> 
  set_engine("partykit") |> 
  set_mode("regression") |> 
  translate()

Translation from parsnip to the original package (classification)

r uses_extension("rand_forest", "partykit", "classification")

#| label: partykit-class
library(bonsai)

rand_forest() |> 
  set_engine("partykit") |> 
  set_mode("classification") |> 
  translate()

parsnip::cforest_train() is a wrapper around [partykit::cforest()] (and other functions) that makes it easier to run this model.

Translation from parsnip to the original package (censored regression)

r uses_extension("rand_forest", "partykit", "censored regression")

#| label: party-creg
library(censored)

rand_forest() |> 
  set_engine("partykit") |> 
  set_mode("censored regression") |> 
  translate()

censored::cond_inference_surv_cforest() is a wrapper around [partykit::cforest()] (and other functions) that makes it easier to run this model.

Preprocessing requirements

#| child: template-tree-split-factors.Rmd

Other details

#| child: template-survival-median.Rmd

References



Try the parsnip package in your browser

Any scripts or data that you put into this service are public.

parsnip documentation built on June 8, 2025, 12:10 p.m.