details_bart_dbarts {parsnip}R Documentation

Bayesian additive regression trees via dbarts

Description

dbarts::bart() creates an ensemble of tree-based model whose training and assembly is determined using Bayesian analysis.

Details

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

Tuning Parameters

This model has 4 tuning parameters:

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)

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()
## BART Model Specification (classification)
## 
## Main Arguments:
##   trees = integer(1)
##   prior_terminal_node_coef = double(1)
##   prior_terminal_node_expo = double(1)
##   prior_outcome_range = double(1)
## 
## Computational engine: dbarts 
## 
## Model fit template:
## dbarts::bart(x = missing_arg(), y = missing_arg(), ntree = integer(1), 
##     base = double(1), power = double(1), k = double(1), verbose = FALSE, 
##     keeptrees = TRUE, keepcall = FALSE)

Translation from parsnip to the original package (regression)

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()
## BART Model Specification (regression)
## 
## Main Arguments:
##   trees = integer(1)
##   prior_terminal_node_coef = double(1)
##   prior_terminal_node_expo = double(1)
##   prior_outcome_range = double(1)
## 
## Computational engine: dbarts 
## 
## Model fit template:
## dbarts::bart(x = missing_arg(), y = missing_arg(), ntree = integer(1), 
##     base = double(1), power = double(1), k = double(1), verbose = FALSE, 
##     keeptrees = TRUE, keepcall = FALSE)

Preprocessing requirements

Factor/categorical predictors need to be converted to numeric values (e.g., dummy or indicator variables) for this engine. When using the formula method via fit(), parsnip will convert factor columns to indicators.

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

References


[Package parsnip version 1.3.2 Index]