gbm_grid: CV Tune gbm fits over a grid of parameters in parallel

Description Usage Arguments Details Value

View source: R/gbm_grid.R

Description

This function cross validates a grid of meta-parameter arguments implied by expand.grid(...). The final model is returned with the best fitting parameters.

Usage

1
gbm_grid(y, x, cv.folds, mc.cores = 1, subset = NULL, ...)

Arguments

y

vector of outcomes

x

matrix of predictors

cv.folds

number of cross-validation folds

mc.cores

number of cores

subset

subset of the data to use for training; cross-validation will be performed within subset

...

args to gbm.fit. Arguments can be passed vectors. The function tunes across all rows of expand.grid(...)

Details

Non-grid arguments (such as distribution, weights, etc) can be passed as normal.

Value

A list with $gbm (fitted model with best meta parameters), $best_args (best meta parameters), and $args (all meta parameters with cv err)


patr1ckm/mvtboost documentation built on May 24, 2019, 8:21 p.m.