def fit(self, X, y=None):
"""Fit the gradient boosting model
Parameters
----------
X : array-like [n_samples, n_features]
y : array-like
Returns
-------
self : the fitted Regressor
Notes
-----
This differs from the XGBoost version not supporting the ``eval_set``,
``eval_metric``, ``early_stopping_rounds`` and ``verbose`` fit
kwargs.
"""
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
评论列表
文章目录