# Python - Classification algorithms implementation which accept missing values?

I've a binary classification problem which I want to solve where many features have a lot of missing values.

I know that imputing with mean/median/variance is a solution, but I'd like to run tests only with the original dataset without imputing. XGBoost allows the presence of missing values, while all the scikit-learn algorithms don't (correct me if I'm wrong), even if theoretically algorithm like random forest could accept missing values.

Other than XGBoost, which other python classification algorithms implementations allow the usage of a dataset with missing values?

• Instead of trying to work with NaN values, most people either exclude the observations with missing data (which is bad) or use imputation (better). As always, the best strategy is to just collect complete data (but that's sometimes impossible because life is unfair).
– Sycorax
Mar 21 '18 at 14:20
• If I'd exclude observations with missing data, probably my dataset would end up being empty :) Mar 21 '18 at 14:22
• @Sycorax I think NA and NaN are different things Mar 21 '18 at 14:28
• allowing NaNs is just an euphemism to imputation of some sort Mar 21 '18 at 14:29
• @hxd1011 Depends on how NaNs arise. I'm assuming that OP didn't do something silly like take $\log(x)$ for a vector $x$ which contains 0s, or divide by zero...
– Sycorax
Mar 21 '18 at 14:29