dbarts | R Documentation |
Creates a sampler object for a given problem which fits a Bayesian Additive Regreesion Trees model. Internally stores state in such a way as to be mutable.
dbarts(
formula, data, test, subset, weights, offset, offset.test = offset,
verbose = FALSE, n.samples = 800L,
tree.prior = cgm, node.prior = normal, resid.prior = chisq,
proposal.probs = c(
birth_death = 0.5, swap = 0.1, change = 0.4, birth = 0.5),
control = dbarts::dbartsControl(), sigma = NA_real_)
formula |
An object of class |
data |
An optional data frame, list, or environment containing predictors to be used with the model. For backwards compatibility, can also be the |
test |
An optional matrix or data frame with the same number of predictors as |
subset |
An optional vector specifying a subset of observations to be used in the fitting process. |
weights |
An optional vector of weights to be used in the fitting process. When present, BART fits a model with observations |
offset |
An optional vector specifying an offset from 0 for the relationship between the underyling function, |
offset.test |
The equivalent of |
verbose |
A logical determining if additional output is printed to the console. See |
n.samples |
A positive integer setting the default number of posterior samples to be returned for each run of the sampler. Can be overriden at run-time. See |
tree.prior |
An expression of the form |
node.prior |
An expression of the form |
resid.prior |
An expression of the form |
proposal.probs |
Named numeric vector or |
control |
An object inheriting from |
sigma |
A positive numeric estimate of the residual standard deviation. If |
“Discrete sampler” refers to that dbarts
is implemented using ReferenceClasses, so that there exists a mutable object constructed in C++ that is largely obscured from R. The dbarts
function is the primary way of creating a dbartsSampler
, for which a variety of methods exist.
A reference object of dbartsSampler
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.