r descr_models("bart", "dbarts")
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:
param$item
Parsnip changes the default range for trees
to c(50, 500)
.
Some relevant arguments that can be passed to set_engine()
:
keepevery
, n.thin
: Every keepevery
draw is kept to be returned to the user. Useful for "thinning" samples.
ntree
, n.trees
: The number of trees in the sum-of-trees formulation.
ndpost
, n.samples
: The number of posterior draws after burn in, ndpost
/ keepevery
will actually be returned.
nskip
, n.burn
: Number of MCMC iterations to be treated as burn in.
nchain
, n.chains
: Integer specifying how many independent tree sets and fits should be calculated.
nthread
, n.threads
: Integer specifying how many threads to use. Depending on the CPU architecture, using more than the number of chains can degrade performance for small/medium data sets. As such some calculations may be executed single threaded regardless.
combinechains
, combineChains
: Logical; if TRUE
, samples will be returned in arrays of dimensions equal to nchain
times ndpost
times number of observations.
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()
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()
[dbarts::bart()] will also convert the factors to indicators if the user does not create them first.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.