Grid Search with Recursive Feature Elimination in scikit-learn pipeline returns an error
问题 I am trying to chain Grid Search and Recursive Feature Elimination in a Pipeline using scikit-learn. GridSearchCV and RFE with "bare" classifier works fine: from sklearn.datasets import make_friedman1 from sklearn import feature_selection from sklearn.grid_search import GridSearchCV from sklearn.svm import SVR X, y = make_friedman1(n_samples=50, n_features=10, random_state=0) est = SVR(kernel="linear") selector = feature_selection.RFE(est) param_grid = dict(estimator__C=[0.1, 1, 10]) clf =