# ExtraTreeClassifier does not handle missing values

I am using sklearn.tree.ExtraTreeClassifier. It does not handle missing value in training data. All tree-based algorithms handle missing value internally. So, is there anything exceptional ExtraTreeClassifier algorithm or it is just that sklearn has not implemented handling missing values in ExtraTreeClassifier ?

ValueError: Input contains NaN, infinity or a value too large for dtype('float32')

• ExtraTreeClassifier isn't the only one. Most of the sklearn classifiers I'm familiar with do not automatically "handle" missing data. You can add an imputation step to your pipeline using one of the included transformers in the sklearn.impute module or try a different package such as xgboost. – AffableAmbler Apr 23 at 19:15
• Missing values sometime give cue about data and domain. Try to handle yourself and usjng proper reasoning. I mean, don't simply use mean or median l. Try to know why it is NaN. It's OK if your are just doing to learn modelling. Your Intuition is correct, SKlearn expect values in numeric form. – 10xAI Apr 24 at 5:12