Hypers {SoftBart}R Documentation

Create a list of hyperparameter values

Description

Creates a list which holds all the hyperparameters for use with the model-fitting functions and with the MakeForest functionality.

Usage

Hypers(
  X,
  Y,
  group = NULL,
  alpha = 1,
  beta = 2,
  gamma = 0.95,
  k = 2,
  sigma_hat = NULL,
  shape = 1,
  width = 0.1,
  num_tree = 20,
  alpha_scale = NULL,
  alpha_shape_1 = 0.5,
  alpha_shape_2 = 1,
  tau_rate = 10,
  num_tree_prob = NULL,
  temperature = 1,
  weights = NULL,
  normalize_Y = TRUE
)

Arguments

X

A matrix of training data covariates.

Y

A vector of training data responses.

group

Allows for grouping of covariates with shared splitting proportions, which is useful for categorical dummy variables. For each column of X, group gives the associated group.

alpha

Positive constant controlling the sparsity level.

beta

Parameter penalizing tree depth in the branching process prior.

gamma

Parameter penalizing new nodes in the branching process prior.

k

Related to the signal-to-noise ratio, sigma_mu = 0.5 / (sqrt(num_tree) * k). BART defaults to k = 2 after applying the max/min normalization to the outcome.

sigma_hat

A prior guess at the conditional variance of Y given X. If not provided, this is estimated empirically by linear regression.

shape

Shape parameter for gating probabilities.

width

Bandwidth of gating probabilities.

num_tree

Number of trees in the ensemble.

alpha_scale

Scale of the prior for alpha; if not provided, defaults to the number of predictors.

alpha_shape_1

Shape parameter for prior on alpha; if not provided, defaults to 0.5.

alpha_shape_2

Shape parameter for prior on alpha; if not provided, defaults to 1.0.

tau_rate

Rate parameter for the bandwidths of the trees with an exponential prior; defaults to 10.

num_tree_prob

Parameter for geometric prior on number of tree.

temperature

The temperature applied to the posterior distribution; set to 1 unless you know what you are doing.

weights

Only used by the function softbart, this is a vector of weights to be used in heteroskedastic regression models, with the variance of an observation given by sigma_sq / weight.

normalize_Y

Do you want to compute sigma_hat after applying the standard BART max/min normalization to (-0.5, 0.5) for the outcome? If FALSE, no normalization is applied. This might be useful for fitting custom models where the outcome is normalized by hand.

Value

Returns a list containing the function arguments.


[Package SoftBart version 1.0.1 Index]