Expand description
Binary encoder: encode categorical integers as binary digits.
BinaryEncoder encodes each categorical integer feature into ceil(log2(k))
binary columns, where k is the number of distinct categories. This is more
compact than one-hot encoding for high-cardinality features.
§Example
Input column with categories {0, 1, 2, 3}:
0 → [0, 0]
1 → [0, 1]
2 → [1, 0]
3 → [1, 1]Structs§
- Binary
Encoder - An unfitted binary encoder.
- Fitted
Binary Encoder - A fitted binary encoder holding the number of categories and binary digits per input feature.