How to use smote function and XGboost in R at the same time

143 views Asked by At

Anyone knows how to use smote function and XGboost in R at the same time? I used smote function to balance the classes first, then use XGboost for training. However, one of the parameters in the xgb.cv function is label, which requires as.matrix type, meaning the data must be numeric. But when i used smote function, i converted the target variable to factor because it is required. Now i can not use xgb.

0

There are 0 answers