Sklearn pass fit() parameters to xgboost in pipeline
问题 Similar to How to pass a parameter to only one part of a pipeline object in scikit learn? I want to pass parameters to only one part of a pipeline. Usually, it should work fine like: estimator = XGBClassifier() pipeline = Pipeline([ ('clf', estimator) ]) and executed like pipeline.fit(X_train, y_train, clf__early_stopping_rounds=20) but it fails with: /usr/local/lib/python3.5/site-packages/sklearn/pipeline.py in fit(self, X, y, **fit_params) 114 """ 115 Xt, yt, fit_params = self._pre