I'm trying to debug something, and I think
Imputer might be causing me some problems.
Imputer in a cross-validation setting, what happens if the test set has no missing values, but (in an extreme case), the validation set has some column that is completely missing. I believe
Imputer will then remove that entire column. Then the classifier will be given an input of a lesser dimension?
I think the reverse case can also lead to problems (training data has a completely missing column, but validation data is complete).
Imputer deal with these situations?
My usage is something like this:
imputer = Imputer(missing_values="NaN", axis=0, strategy="mean", verbose=5) pipe = Pipeline(steps=[("imputer", imputer), ('my_classifier', my_classifier)]) gs = GridSearchCV(pipe, cv=5) gs.fit(x_train, y_train)