from sklearn.preprocessing import Imputer
import numpy as np
X_train = np.array([[1, np.NaN], [1, 1]])
X_test = np.array([[1, 1], [1, 1]])
imputer = Imputer(add_indicator_features=True)
X_train_imp = imputer.fit_transform(X_train)
print(X_train_imp.shape)
X_test_imp = imputer.transform(X_test)
print(X_test_imp.shape)
Expected Results
(2, 3)
(2, 3)
Actual Results
(2, 3)
(2, 2)
Versions
Linux-3.13.0-54-generic-x86_64-with-Ubuntu-14.04-trusty
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
[GCC 4.8.4]
NumPy 1.11.0
SciPy 0.17.0
Scikit-Learn 0.18.dev0