iaml.actionables.cleaning.act_drop_high_cardinality_categorical¶
[STEP] Drop or hash high-cardinality categorical columns.
Classes¶
[STEP] Drop or hash high-cardinality categorical columns. |
Module Contents¶
- class iaml.actionables.cleaning.act_drop_high_cardinality_categorical.ActDropHighCardinalityCategorical¶
Bases:
iaml.actionable.Actionable[STEP] Drop or hash high-cardinality categorical columns.
- name: str = 'Handle high-cardinality categorical columns'¶
Step’s name.
- configuration¶
Configuration of this step (equivalent to hyperparameters for models).
- columns_to_drop: list[str] = []¶
- columns_to_hash: list[str] = []¶
- cardinality_stats: dict[str, dict[str, float]]¶
- strategy: str = 'drop'¶
- hash_bins: int = 0¶
- hash_key: str | bytes | None = None¶
- missing_value: int = -1¶
- fit(dataset: iaml.dataset.Dataset) iaml.actionable.Actionable¶
Fits the step on the given dataset.
- Parameters:
dataset (Dataset) – Features and labels.
- Returns:
Fitted step.
- transform(X: pandas.DataFrame) pandas.DataFrame¶
- suitable(dataset: iaml.dataset.Dataset) bool¶
Evaluates whether the step is suitable to run with the given dataset.
- Parameters:
dataset (Dataset) – Dataset to evaluate on.
- Returns:
Whether the step is suitable to run.
- priorize(candidate: iaml.candidate.Candidate = None) float¶
Evaluates the priority of the step within a pipeline. 0 means the execution of the step should not be prioritized, and 1 means it should be executed early in the pipeline.
- Parameters:
candidate (Candidate, optional) – Candidate on which the priority should be evaluated.
- Returns:
Value between 0 and 1.