iskandr / fancyimpute

Multivariate imputation and matrix completion algorithms implemented in Python
Apache License 2.0
1.25k stars 178 forks source link

Using this as a scikit learn transformer #51

Closed echo66 closed 6 years ago

echo66 commented 6 years ago

Greetings!

I was studying the code for MICE and noticed that the complete method won't keep any parameters to estimate new incoming missing values. As such, how can you use this after the model training phase???

sergeyf commented 6 years ago

Howdy. Yes, this is a totally transductive implementation. That is - you have a matrix X and all of our algorithms complete them based only on the present values in X.

There is no support for inductive mode here. You have to separately complete X_train and X_test.

However! There is a MICE PR for scikit-learn that's pretty much done - check that out instead. It should be merged soon hopefully: https://github.com/scikit-learn/scikit-learn/pull/8478

Once this PR is merged and a new sklearn version is out, MICE will be removed from fancyimpute.