xgboostModel: Run an eXtreme Gradient Boosting model

Description Usage Arguments Examples

Description

Run an eXtreme Gradient Boosting model

Usage

1
2
xgboostModel(datasets, target, paramxgBoost = NULL, nrounds = 100,
  early.stop.round = 5, print.every.n = 50, verbose = 1)

Arguments

datasets

a list of train, test and validation datasets

target

the name of the target feature in datasets

paramxgBoost

a list of parameters for xgboost

nrounds

the max number of iterations

early.stop.round

If NULL, the early stopping function is not triggered. If set to an integer k, training with a validation set will stop if the performance keeps getting worse consecutively for k rounds.

print.every.n

Print every N progress messages when verbose>0. Default is 1 which means all messages are printed.

verbose

If 0, xgboost will stay silent. If 1, xgboost will print information of performance. If 2, xgboost will print information of both

Examples

1
2
3
4
5
set.seed(42)
x = iris
x$Species = ifelse(x$Species == "versicolor",1, 0)
dat = splitDataToTrainTestDataFrame(x,.9,.25)
mod = xgboostModel(dat,"Species",nrounds = 200, early.stop.round = 5, verbose = 1)

ivanliu1989/RQuant documentation built on Sept. 13, 2019, 11:53 a.m.