Skip to content

Glossary: ML Beyond the Basics

GroupMedianImputer

A custom stateful scikit-learn step that fills a missing value with the median of its group, such as `avg_rating` by `roast`. It learns the medians in `fit` from training rows only, then applies them in `transform`.

Where the book teaches it

Related terms

Custom transformerStateful, stateless step