Expand description
Simple imputer: fill missing (NaN) values per feature column.
SimpleImputer supports four imputation strategies:
ImputeStrategy::Mean— replace NaN with the column meanImputeStrategy::Median— replace NaN with the column medianImputeStrategy::MostFrequent— replace NaN with the most common valueImputeStrategy::Constant— replace NaN with a fixed constant value
Fitting ignores NaN values when computing statistics (e.g. the mean is the
mean of all non-NaN values in that column). Columns that are entirely NaN
at fit time are filled with F::zero() under Mean/Median and with the
most frequent non-NaN value (defaulting to F::zero()) under
MostFrequent.
Structs§
- Fitted
Simple Imputer - A fitted simple imputer holding one fill value per feature column.
- Simple
Imputer - An unfitted simple imputer.
Enums§
- Impute
Strategy - The strategy used to compute the fill value for each column.