| ForestModelConfig | R Documentation |
The "low-level" stochtree interface enables a high degreee of sampler customization, in which users employ R wrappers around C++ objects like ForestDataset, Outcome, CppRng, and ForestModel to run the Gibbs sampler of a BART model with custom modifications. ForestModelConfig allows users to specify / query the parameters of a forest model they wish to run.
Vector of integer-coded feature types (integers where 0 = numeric, 1 = ordered categorical, 2 = unordered categorical)
Vector of (0-indexed) indices of trees to update in a sweep
Vector specifying sampling probability for all p covariates in ForestDataset
Number of trees in a forest
Number of features in a forest model training set
Number of observations in a forest model training set
Root node split probability in tree prior
Depth prior penalty in tree prior
Minimum number of samples in a tree leaf
Maximum depth of any tree in the ensemble in the model
Integer coded leaf model type
Scale parameter used in Gaussian leaf models
Shape parameter for IG leaf models
Scale parameter for IG leaf models
Number of unique cutpoints to consider
Number of features to subsample for the GFR algorithm
feature_typesVector of integer-coded feature types (integers where 0 = numeric, 1 = ordered categorical, 2 = unordered categorical)
sweep_update_indicesVector of trees to update in a sweep
num_treesNumber of trees in the forest being sampled
num_featuresNumber of features in training dataset
num_observationsNumber of observations in training dataset
leaf_dimensionDimension of the leaf model
alphaRoot node split probability in tree prior
betaDepth prior penalty in tree prior
min_samples_leafMinimum number of samples in a tree leaf
max_depthMaximum depth of any tree in the ensemble in the model. Setting to -1 does not enforce any depth limits on trees.
leaf_model_typeInteger specifying the leaf model type (0 = constant leaf, 1 = univariate leaf regression, 2 = multivariate leaf regression)
leaf_model_scaleScale parameter used in Gaussian leaf models
variable_weightsVector specifying sampling probability for all p covariates in ForestDataset
variance_forest_shapeShape parameter for IG leaf models (applicable when leaf_model_type = 3)
variance_forest_scaleScale parameter for IG leaf models (applicable when leaf_model_type = 3)
cutpoint_grid_sizeNumber of unique cutpoints to consider
num_features_subsampleNumber of features to subsample for the GFR algorithm Create a new ForestModelConfig object.
new()ForestModelConfig$new( feature_types = NULL, sweep_update_indices = NULL, num_trees = NULL, num_features = NULL, num_observations = NULL, variable_weights = NULL, leaf_dimension = 1, alpha = 0.95, beta = 2, min_samples_leaf = 5, max_depth = -1, leaf_model_type = 1, leaf_model_scale = NULL, variance_forest_shape = 1, variance_forest_scale = 1, cutpoint_grid_size = 100, num_features_subsample = NULL )
feature_typesVector of integer-coded feature types (where 0 = numeric, 1 = ordered categorical, 2 = unordered categorical)
sweep_update_indicesVector of (0-indexed) indices of trees to update in a sweep
num_treesNumber of trees in the forest being sampled
num_featuresNumber of features in training dataset
num_observationsNumber of observations in training dataset
variable_weightsVector specifying sampling probability for all p covariates in ForestDataset
leaf_dimensionDimension of the leaf model (default: 1)
alphaRoot node split probability in tree prior (default: 0.95)
betaDepth prior penalty in tree prior (default: 2.0)
min_samples_leafMinimum number of samples in a tree leaf (default: 5)
max_depthMaximum depth of any tree in the ensemble in the model. Setting to -1 does not enforce any depth limits on trees. Default: -1.
leaf_model_typeInteger specifying the leaf model type (0 = constant leaf, 1 = univariate leaf regression, 2 = multivariate leaf regression). Default: 0.
leaf_model_scaleScale parameter used in Gaussian leaf models (can either be a scalar or a q x q matrix, where q is the dimensionality of the basis and is only >1 when leaf_model_int = 2). Calibrated internally as 1/num_trees, propagated along diagonal if needed for multivariate leaf models.
variance_forest_shapeShape parameter for IG leaf models (applicable when leaf_model_type = 3). Default: 1.
variance_forest_scaleScale parameter for IG leaf models (applicable when leaf_model_type = 3). Default: 1.
cutpoint_grid_sizeNumber of unique cutpoints to consider (default: 100)
num_features_subsampleNumber of features to subsample for the GFR algorithm
A new ForestModelConfig object.
update_feature_types()Update feature types
ForestModelConfig$update_feature_types(feature_types)
feature_typesVector of integer-coded feature types (integers where 0 = numeric, 1 = ordered categorical, 2 = unordered categorical)
update_sweep_indices()Update sweep update indices
ForestModelConfig$update_sweep_indices(sweep_update_indices)
sweep_update_indicesVector of (0-indexed) indices of trees to update in a sweep
update_variable_weights()Update variable weights
ForestModelConfig$update_variable_weights(variable_weights)
variable_weightsVector specifying sampling probability for all p covariates in ForestDataset
update_alpha()Update root node split probability in tree prior
ForestModelConfig$update_alpha(alpha)
alphaRoot node split probability in tree prior
update_beta()Update depth prior penalty in tree prior
ForestModelConfig$update_beta(beta)
betaDepth prior penalty in tree prior
update_min_samples_leaf()Update minimum number of samples per leaf node in the tree prior
ForestModelConfig$update_min_samples_leaf(min_samples_leaf)
min_samples_leafMinimum number of samples in a tree leaf
update_max_depth()Update max depth in the tree prior
ForestModelConfig$update_max_depth(max_depth)
max_depthMaximum depth of any tree in the ensemble in the model
update_leaf_model_scale()Update scale parameter used in Gaussian leaf models
ForestModelConfig$update_leaf_model_scale(leaf_model_scale)
leaf_model_scaleScale parameter used in Gaussian leaf models
update_variance_forest_shape()Update shape parameter for IG leaf models
ForestModelConfig$update_variance_forest_shape(variance_forest_shape)
variance_forest_shapeShape parameter for IG leaf models
update_variance_forest_scale()Update scale parameter for IG leaf models
ForestModelConfig$update_variance_forest_scale(variance_forest_scale)
variance_forest_scaleScale parameter for IG leaf models
update_cutpoint_grid_size()Update number of unique cutpoints to consider
ForestModelConfig$update_cutpoint_grid_size(cutpoint_grid_size)
cutpoint_grid_sizeNumber of unique cutpoints to consider
update_num_features_subsample()Update number of features to subsample for the GFR algorithm
ForestModelConfig$update_num_features_subsample(num_features_subsample)
num_features_subsampleNumber of features to subsample for the GFR algorithm
get_feature_types()Query feature types for this ForestModelConfig object
ForestModelConfig$get_feature_types()
get_sweep_indices()Query sweep update indices for this ForestModelConfig object
ForestModelConfig$get_sweep_indices()
get_variable_weights()Query variable weights for this ForestModelConfig object
ForestModelConfig$get_variable_weights()
get_num_trees()Query number of trees
ForestModelConfig$get_num_trees()
get_num_features()Query number of features
ForestModelConfig$get_num_features()
get_num_observations()Query number of observations
ForestModelConfig$get_num_observations()
get_alpha()Query root node split probability in tree prior for this ForestModelConfig object
ForestModelConfig$get_alpha()
get_beta()Query depth prior penalty in tree prior for this ForestModelConfig object
ForestModelConfig$get_beta()
get_min_samples_leaf()Query root node split probability in tree prior for this ForestModelConfig object
ForestModelConfig$get_min_samples_leaf()
get_max_depth()Query root node split probability in tree prior for this ForestModelConfig object
ForestModelConfig$get_max_depth()
get_leaf_model_type()Query (integer-coded) type of leaf model
ForestModelConfig$get_leaf_model_type()
get_leaf_model_scale()Query scale parameter used in Gaussian leaf models for this ForestModelConfig object
ForestModelConfig$get_leaf_model_scale()
get_variance_forest_shape()Query shape parameter for IG leaf models for this ForestModelConfig object
ForestModelConfig$get_variance_forest_shape()
get_variance_forest_scale()Query scale parameter for IG leaf models for this ForestModelConfig object
ForestModelConfig$get_variance_forest_scale()
get_cutpoint_grid_size()Query number of unique cutpoints to consider for this ForestModelConfig object
ForestModelConfig$get_cutpoint_grid_size()
get_num_features_subsample()Query number of features to subsample for the GFR algorithm
ForestModelConfig$get_num_features_subsample()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.