The function for training user-defined XGBoost model.
Hyperparameters for tuning: tree_depth, trees,learn_rate, mtry, min_n, loss_reduction, sample_size
Usage
xgBoost(
algo = "XGBoost",
engine = "xgboost",
mode = "classification",
trainingData = NULL,
splitedData = NULL,
formula = NULL,
rec = NULL,
v = 5,
gridNum = 5,
iter = 10,
metric = NULL,
seed = 1234
)
Arguments
- algo
A name of the algorithm which can be customized by user (default: "XGBoost").
- engine
The name of software that should be used to fit the model ("xgboost" (default)).
- mode
The model type. It should be "classification" or "regression" ("classification" (default), "regression").
- trainingData
The training data.
- splitedData
A data frame including metadata of split.
- formula
formula for modeling
- rec
Recipe object containing preprocessing information for cross-validation.
- v
Applying v-fold cross validation in modeling process (default: 5).
- gridNum
Initial number of iterations to run before starting the optimization algorithm.
- iter
The maximum number of search iterations.
- metric
Metric to evaluate the performance (classification: "roc_auc" (default), "accuracy" / regression: "rmse" (default), "rsq").
- seed
Seed for reproducible results.