iaml.actionables.imbalance.act_smote¶
[STEP] SMOTE
Classes¶
[STEP] SMOTE |
Module Contents¶
- class iaml.actionables.imbalance.act_smote.ActSMOTE¶
Bases:
iaml.actionable.Actionable[STEP] SMOTE
- name: str = 'SMOTE'¶
Step’s name.
- refs: list[dict[str, Any]]¶
List of references for this step.
- configuration¶
Configuration of this step (equivalent to hyperparameters for models).
- resampler: imblearn.over_sampling.SMOTE | imblearn.over_sampling.SMOTENC | None = None¶
- categorical_columns: list[str] = []¶
- categorical_indices: list[int] = []¶
- numeric_columns: list[str] = []¶
- fit(dataset: iaml.dataset.Dataset) iaml.actionable.Actionable¶
Fits the step on the given dataset.
- Parameters:
dataset (Dataset) – Features and labels.
- Returns:
Fitted step.
- resample(X: pandas.DataFrame, y: pandas.DataFrame) tuple[pandas.DataFrame, pandas.DataFrame]¶
Apply SMOTE.
- Parameters:
X (pd.DataFrame) – Features to resample
y (pd.DataFrame) – Labels to resample
- Returns:
Resampled X and y
- 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.
- 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.