paul-english / predictive_imputer

Predictive imputation of missing values with sklearn interface. This is a simple implementation of the idea presented in the MissForest R package.
MIT License
39 stars 14 forks source link

Could you provide an example code for using predictive_imputer? #331

Open apavlo89 opened 3 years ago

apavlo89 commented 3 years ago

It would be of such great help if you have an example of how this works using a dataset = pd.read_csv('C:/location/test.csv') example for us noobs with programming.

paul-english commented 3 years ago

Sure, it's following a pattern that the scikit-learn library uses, https://scikit-learn.org/stable/developers/develop.html, since it's a relatively popular library.

You can see an example in the tests https://github.com/log0ymxm/predictive_imputer/blob/master/tests/test_predictive_imputer.py#L37-L38

Please note that this is really more a proof of concept kind of library, I haven't updated or used this in a long time, and I don't really guarantee that I've 100% captured the methodology of the original idea. Additionally any use of imputation should involve some analysis to judge if it's actually producing accurate results for you.