Missing Values in a Model
Most scikit-learn models stop with an error when a feature holds NaN, and dropping those rows throws away examples and leaves a new pet with a blank unscorable, so SimpleImputer fills each blank with a value learned from the training data (the median for numbers, the most frequent value for categories), and add_indicator=True keeps a column saying which values were missing.
Updated

- Category
- Machine Learning
- Level
- Journeyman
- Tags
- ai, Imputation, Missing Indicator, Missing Value, NaN (python), python, SimpleImputer