I'm using xgboost
for training a model on a data with extreme class imbalance. After referring from here.
After performing grid search and some manual settings, I found that the following parameters work the best for me:
weight <- as.numeric(labels) * nrow(test) / length(labels)
upscale <- sum(weight * (labels == 1.0))
xgb_params = list(
objective = 'binary:logistic',
eta = 0.1,
max_depth = 4,
eval_metric = 'auc',
max_delta_step = 10,
scale_pos_weight = upscale
)
How can the process of setting optimal hyperparameters for xgboost
be automated for best AUC? Please note that some of these parameters aren't supported by the caret
implementation of xgboost
but are very important for the model I have to design.