ImputeMode#

class sdm.processing.categorical.ImputeMode#

Bases: Processor

Replace missing categorical values with fitted per-column modes.

Negative category codes are missing values. The fitted fill value is the most frequent observed category code learned independently for every categorical column and applied without changing its category vocabulary. Ties select the lowest category code.

Transform inputs must use the fitted per-column category vocabularies. Use AlignCategories before this processor when training and transform inputs were tensorized independently.

Capabilities#

Handled Semantic Types

categorical

Requires Fitting

✅