I'm trying to learn XGB with a multiclass classification problem (Kaggle's Otto Group Product Classification). I keep getting the following error
XGBoostError: [04:49:48] ../include/xgboost/objective.h:98: multioutput is not supported by current objective function
Here's my code:
import xgboost as xgb
params = {
'objective': 'multi:softmax',
'num_class': 9,
'max_depth': 5,
'learning_rate': 0.1,
'subsample': 0.8,
'colsample_bytree': 0.8,
'seed': 42
}
dtrain = xgb.DMatrix(X_train, label=y_train)
num_rounds = 100
xgb_model = xgb.train(params, dtrain, num_rounds)
X_train is a 50,000 x 93 dataframe and y_train is a 50,000 x 9 numpy area. Additionally, y_train is a one-hot encoded array representing the 9 categories.
I'm not sure why I'm getting a multi-ouput error since this isn't a multi-output problem.