You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IterativeImputer automatically removes variables with all missing values #16977
IterativeImputer seems to have a strange behavior where a variable with all missing values is just removed from the data decreasing the number of columns in the matrix without setting off any warnings. This appears to happen at the initial imputation step.
I know I should not give it a variable without any useful values but in the course of a large code it makes no sense that if there is such an error in the data, the code would stop for such an error. I think it should give the option to fill such values with certain value or even return the column with Nan so I can do whatever intervention needed.
Code example:
import numpy as np
from sklearn.experimental import enable_iterative_imputer
from sklearn.impute import IterativeImputer
Activity
rth commentedon Apr 21, 2020
Thanks for the feedback @mabdelhack ! See the discussion in #16426. Once the corresponding PR is merged, we can make one for IterativeImputer.
rth commentedon Apr 21, 2020
No actually the corresponding PR #16695 already include a fix for IterativeImputer
mabdelhack commentedon Apr 22, 2020
Thanks a lot for the response. I'll wait for the new version, and meanwhile I'll preprocess my matrix to make sure it passes unscathed.
ENH keep features with all missing values during imputation (#24770)