AddCategoryCounts#
- class sdm.processing.categorical.AddCategoryCounts(min_cardinality: int = 0)#
Bases:
ProcessorAdd the log row count of each categorical value.
Each eligible column receives one numerical column
<column>__countholdinglog1pof the number of fitted rows sharing the row’s code. Negative codes (missing or unknown values) share one count.Transform inputs must use the fitted per-column category vocabularies. Use
AlignCategoriesbefore this processor when training and transform inputs were tensorized independently.- Parameters:
min_cardinality (int) – A count column is added when its fitted vocabulary size exceeds this value. Missing values do not contribute to vocabulary size. Defaults to 0.
Capabilities#
Handled Semantic Types |
|
Requires Fitting |
✅ |