What is the difference between xgb.train and xgb.XGBRegressor (or xgb.XGBClassifier)?

后端 未结 3 1690
我寻月下人不归
我寻月下人不归 2020-12-14 17:56

I already know \"xgboost.XGBRegressor is a Scikit-Learn Wrapper interface for XGBoost.\"

But do they have any other difference?

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-14 18:53

    @Maxim, as of xgboost 0.90 (or much before), these differences don't exist anymore in that xgboost.XGBClassifier.fit:

    • has callbacks
    • allows contiunation with the xgb_model parameter
    • and supports the same builtin eval metrics or custom eval functions

    What I find is different is evals_result, in that it has to be retrieved separately after fit (clf.evals_result()) and the resulting dict is different because it can't take advantage of the name of the evals in the watchlist ( watchlist = [(d_train, 'train'), (d_valid, 'valid')] ) .

提交回复
热议问题