Description Usage Arguments Examples
Run an eXtreme Gradient Boosting model
1 2 | xgboostModel(datasets, target, paramxgBoost = NULL, nrounds = 100,
early.stop.round = 5, print.every.n = 50, verbose = 1)
|
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 |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.