Trains an Extreme Gradient Boosting (XGBoost) model using caret::train
for binary classification.
xb_dia(X, y, tune = FALSE, cv_folds = 5, tune_length = 20)A caret::train object representing the trained XGBoost model.
A data frame of features.
A factor vector of class labels.
Logical, whether to perform hyperparameter tuning using caret's
default grid (if TRUE) or use fixed values (if FALSE).
An integer, the number of cross-validation folds for caret.
An integer, the number of random parameter combinations to try when tune=TRUE. Only used when search="random". Default is 20.