I am trying to use SMOTE from imblearn package in Python, but my data has a lot of missing values and I got the following error:
ValueError: Input contains NaN, infinity or a value too large for dtype('float64').
I checked the parameters here, and it seems that there is not one dealing with missing value.
Is there a way to generate synthetic samples with missing values?
SMOTE does not perform filling up your missing or NaN values. You need to fill them up and then feed for SMOTE analysis. Dealing with missing values is a different task altogether, you can take a look at Imputer from sklearn to begin with. Here is another write-up on sklearn regarding missing values : Imputing missing values
Once you have finished dealing with NaN values, then feed your modified data to SMOTE.
References
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With