Usage
tsp.gbm(x, y, offset = NULL, misc = NULL, distribution = "bernoulli", w = NULL, var.monotone = NULL, n.trees = 100, interaction.depth = 1, n.minobsinnode = 10, shrinkage = 0.001, bag.fraction = 0.5, train.fraction = 1, keep.data = TRUE, verbose = TRUE)
Arguments
x
input matrix, of dimension nobs x nvars; each row is an
observation vector.
offset
a vector of values for the offset
misc
is an R object that is simply passed on to the gbm engine. (refer to "gbm.fit" function in the "gbm" package)
distribution
A character string specifying the name of the distribution to use or a list with a component. The default value is "bernoulli" for logistic regression.
w
w is a vector of weights of the same length as the y.
var.monotone
an optional vector, the same length as the number of predictors, indicating which variables have a monotone increasing (+1), decreasing (-1), or arbitrary (0) relationship with the outcome.
n.trees
the total number of trees to fit. This is equivalent to the number of iterations and the number of basis functions in the additive expansion.
interaction.depth
The maximum depth of variable interactions. 1 implies an additive model, 2 implies a model with up to 2-way interactions, etc.
n.minobsinnode
minimum number of observations in the trees terminal nodes. Note that this is the actual number of observations not the total weight.
shrinkage
a shrinkage parameter applied to each tree in the expansion. Also known as the learning rate or step-size reduction.
bag.fraction
the fraction of the training set observations randomly selected to propose the next tree in the expansion.
train.fraction
The first train.fraction * nrows(data) observations are used to fit the gbm and the remainder are used for computing out-of-sample estimates of the loss function.
keep.data
a logical variable indicating whether to keep the data and an index of the data stored with the object.
verbose
If TRUE, tsp.gbm will print out progress and performance indicators.