scikit-learn provides three imputation strategies: SimpleImputer(), IterativeImputer(), and KNNImputer(). I'd like to know how to decide which imputer to use.

I get that SimpleImputer() is best for cases where there are only a small number of missing observations, and where missingness in one feature is not affected by other features. My wild guess is that IterativeImputer() would be good for imputing numeric features and KNNImputer() would be good for imputing categorical features. I have absolutely nothing to back this up beyond a hunch.

I read the scikit-learn Imputation of Missing Values and Impute Missing Values Before Building an Estimator tutorials and a blog post on Stop Wasting Useful Information When Imputing Missing Values. None of these provided guidance on the best strategy to use so far as I could tell.

Are there any heuristics for choosing which imputer to use?

  • $\begingroup$ What is your sample size and fraction of observations having at least one missing variable? What is the frequency distribution of the number ofo missing variables per observation? How does scikit combine the separate predictive analyses of the many filled-in datasets? And when in doubt use predictive mean matching. $\endgroup$ Apr 27 at 11:38

1 Answer 1


frankly they all look bad. basically you need multiple imputation even if doing prediction (contrary to what https://scikit-learn.org/stable/modules/impute.html#multiple-vs-single-imputation suggests).
Basically replacing the missing value with the predicted value rather than predicted value + "noise", will decrease the noise estimate and therefore lead to getting the wrong regularisation (since we need a lot of regularisation if our data is noisy and little if the data is clean).

So the only one that kind of supports multiple imputation is Iterative imputer, but you will have to do the multiple imputations yourself, and they


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.