core.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:dask-xgboost 作者: dask 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号