调用预测时,Sklearn Imputer Pipeline在X_test值上运行?

时间:2017-10-20 13:55:26

标签: python-3.x machine-learning scikit-learn pipeline imputation

如果我在Sklearn中有这样的管道:

steps = [('imputation', Imputer(missing_values='NaN', strategy='most_frequent', axis=0)),
            ('Ridge', Ridge(alpha=0.1, normalize=True))]
pipeline = Pipeline(steps)
pipeline.fit(X, y)

# Will the imputer be run on the X_test values here?
pred = pipeline.predict(X_test)

是否可以在X_test值上运行imputer?

0 个答案:

没有答案