def fit(self, X, y=None):
"""Fit a gradient boosting classifier
Parameters
----------
X : array-like [n_samples, n_features]
Feature Matrix. May be a dask.array or dask.dataframe
y : array-like
Labels
Returns
-------
self : XGBClassifier
Notes
-----
This differs from the XGBoost version in three ways
1. The ``sample_weight``, ``eval_set``, ``eval_metric``,
``early_stopping_rounds`` and ``verbose`` fit kwargs are not
supported.
2. The labels are not automatically label-encoded
3. The ``classes_`` and ``n_classes_`` attributes are not learned
"""
client = default_client()
xgb_options = self.get_xgb_params()
self._Booster = train(client, xgb_options, X, y,
num_boost_round=self.n_estimators)
return self
评论列表
文章目录