View source: R/initialize_veb_boost_tree.R
initialize_veb_boost_tree | R Documentation |
Initializes a VEB-Boost tree object as the sum of products of nodes, where you can specify how many learners to add, and the multiplicative depth of each learner.
initialize_veb_boost_tree(
learners,
Y,
k = 1,
d = 1,
weights = 1,
family = c("gaussian", "binomial", "negative.binomial", "poisson.log1pexp",
"aft.loglogistic", "ordinal.logistic", "multinomial.titsias"),
exposure = NULL,
my_class_index = NULL
)
learners |
is either a single "learner" object, or a list of k "learner" objects A learner object is comprised of: 1. a fit function $fitFunction: (X, Y, sigma2, currentFit) -> newFit (where a fit is a list that must contain $mu1, $mu2, and $KL_div) 2. a prediction function $predFunction: (X, fit, moment) -> posterior moment (1 or 2) 3. a constant check function $constCheckFunction: (fit) -> (TRUE/FALSE) to check if a fit is essentially constant 4. a current fit $currentFit: must contain $mu1 (first posterior moments), $mu2 (second posterior moments), and $KL_div (KL-divergence from q to prior) (can be NULL, at least to start) 5. a predictor object $X (whatever the $fitFunction and $predFunction take in), used for training (can be NULL, e.g. if using constLearner) 6. a predictor object $X_test (whatever the $fitFunction and $predFunction take in), used for testing (can be NULL) |
Y |
is a numeric vector response |
k |
is an integer, or a vector of integers of length |
d |
is either an integer, or an integer vector of length |
weights |
is a vector of the same length as Y weighting the observations. Relative weights are used and we take care of the scaling for you |
family |
is what family the response is |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.