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

r descr_models("bart", "dbarts")

Tuning Parameters

#| label: bart-param-info
#| echo: false
defaults <- 
  tibble::tibble(parsnip = c("trees", "prior_terminal_node_coef",
                             "prior_terminal_node_expo", "prior_outcome_range"),
                 default = c("200L", "0.95", "2.00", "2.00")
  )

param <-
 bart() |> 
  set_engine("dbarts") |> 
  set_mode("regression") |> 
  make_parameter_list(defaults)

This model has r nrow(param) tuning parameters:

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

Parsnip changes the default range for trees to c(50, 500).

Important engine-specific options

Some relevant arguments that can be passed to set_engine():

Translation from parsnip to the original package (classification)

#| label: bart-cls
parsnip::bart(
  trees = integer(1),
  prior_terminal_node_coef = double(1),
  prior_terminal_node_expo = double(1),
  prior_outcome_range = double(1)
) |> 
  set_engine("dbarts") |> 
  set_mode("classification") |> 
  translate() |> 
  print_model_spec()

Translation from parsnip to the original package (regression)

#| label: bart-reg
parsnip::bart(
  trees = integer(1),
  prior_terminal_node_coef = double(1),
  prior_terminal_node_expo = double(1),
  prior_outcome_range = double(1)
) |> 
  set_engine("dbarts") |> 
  set_mode("regression") |> 
  translate()|> 
  print_model_spec()

Preprocessing requirements

#| child: template-makes-dummies.Rmd

[dbarts::bart()] will also convert the factors to indicators if the user does not create them first.

References



tidymodels/parsnip documentation built on June 2, 2025, 8:10 a.m.