ShuffleCategories#
- class sdm.processing.categorical.ShuffleCategories(method: Literal['shift', 'random'] = 'random')#
Bases:
EnsembleProcessorPermute the integer codes of categorical columns.
One permutation per categorical column is drawn when the processor is fitted. Codes and their corresponding category vectors are permuted together so decoded values remain unchanged. Negative codes represent missing values and are preserved unchanged. Only categorical columns are supported; use
StypeDispatchto apply this processor to the categorical block of a mixed feature table.- Parameters:
method (Literal['shift', 'random']) – Permutation strategy.
"random"remaps codes with an independent permutation."shift"uses a cyclic offset, cycling through every offset in random order.
Capabilities#
Handled Semantic Types |
|
Requires Fitting |
✅ |