cursus.processing.categorical.multiclass_label_processor¶
- class MultiClassLabelProcessor(label_list=None, one_hot=False, strict=False)[source]¶
Bases:
ProcessorProcesses multi-class labels into a format suitable for machine learning models.
This processor handles encoding categorical labels into numerical arrays and optionally provides one-hot encoding using numpy.
- Parameters:
label_list (Optional[List[str]]) – A list of unique label strings. If provided, the processor will learn this mapping; otherwise, it will learn the mapping from the data it processes.
one_hot (bool) – If True, output one-hot encoded labels.
strict (bool) – If True, raise error for unknown labels when label_list is provided.