Imputation

Imputation replaces missing values with an estimated value: median or mean for numerical data, the most frequent value for categorical data, or an estimate from neighbors or a model. The replacement value is learned on the training set only, inside a pipeline, to avoid leakage.

Example

SimpleImputer(strategy='median')

Related concepts

The whole glossary