0
votes

I am confused with how and where to set num_class parameter for multi-classification using Xgboost Scikit API. On the scikit website, there is no such parameter in docs.

xgboost.XGBClassifier(max_depth=3, learning_rate=0.1, n_estimators=100,
    silent=True, objective='binary:logistic', nthread=-1, gamma=0,
    min_child_weight=1, max_delta_step=0, subsample=1, colsample_bytree=1,
    colsample_bylevel=1, reg_alpha=0, reg_lambda=1, scale_pos_weight=1,
    base_score=0.5, seed=0, missing=None)
1

1 Answers

0
votes

The XGB Classifier wrapper function does not require for you to specify the amount of classes priorly. The "label" column passed on the fit is used to specify how many/which classes you will be working with.