View source: R/train_xgboost.R
A wrapper function that automates the xgboost training process
1 2 3 |
dtrain |
A data.frame that contains the training data |
dvalid |
A data.frame that contains the validation data. If NULL then the function uses cross validation. Defaults to NULL. |
x |
A list of column names that identify the explanatory features |
y |
A column name that identifies that target variable |
w |
A column name that contains the name of the weight column. Defaults to NULL |
xgbParams |
A named list containing the XGBoost Learning Parameters |
nrounds |
The maximum number of iterations |
early_stopping_rounds |
If performance doesnt improve for this many rounds then stop training |
nfold |
How many folds to use if doing cross validation |
folds |
A list of pre defined fold indicies (test indicies) - see main xgboost docs for more details. |
verbose |
Print run time messages |
seed |
An integer which will be used as the random seed. Defaults to 1921 |
... |
Additional Arguments to be passed to xgb.cv and/or xgb.train |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.