gbm.fixed | R Documentation |
Calculates a gradient boosting (gbm) object with a fixed number of trees. The optimal number of trees can be identified using gbm.step or some other procedure. Mostly used as a utility function, e.g., when being called by gbm.simplify. It takes as input a dataset and arguments selecting x and y variables, learning rate and tree complexity.
gbm.fixed(data, gbm.x, gbm.y, tree.complexity = 1, site.weights = rep(1, nrow(data)),
verbose = TRUE, learning.rate = 0.001, n.trees = 2000, bag.fraction = 0.5,
family = "bernoulli", keep.data = FALSE, var.monotone = rep(0, length(gbm.x)))
data |
data.frame |
gbm.x |
indices of the predictors in the input dataframe |
gbm.y |
index of the response in the input dataframe |
tree.complexity |
the tree depth - sometimes referred to as interaction depth |
site.weights |
by default set equal |
verbose |
to control reporting |
learning.rate |
controls speed of the gradient descent |
n.trees |
default number of trees |
bag.fraction |
varies random sample size for each new tree |
family |
can be any of "bernoulli", "poisson", "gaussian", or "laplace" |
keep.data |
Logical. If |
var.monotone |
constrain to positive (1) or negative monontone (-1) |
object of class gbm
John R. Leathwick and Jane Elith
Elith, J., J.R. Leathwick and T. Hastie, 2009. A working guide to boosted regression trees. Journal of Animal Ecology 77: 802-81
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.