Skip to content

Commit

Permalink
fix(balance_data_cli): add sampling strategy class
Browse files Browse the repository at this point in the history
  • Loading branch information
msorvoja committed Nov 26, 2024
1 parent e751e94 commit e6dc779
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion eis_toolkit/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,16 @@ class KerasRegressorMetrics(str, Enum):
mae = "mae"


class SMOTETomekSamplingStrategy(str, Enum):
"""Sampling strategies available for SMOTETomek."""

minority = "minority"
not_minority = "not minority"
not_majority = "not majority"
all = "all"
auto = "auto"


INPUT_FILE_OPTION = Annotated[
Path,
typer.Option(
Expand Down Expand Up @@ -3036,7 +3046,7 @@ def balance_data_cli(
input_labels: INPUT_FILE_OPTION,
output_raster: OUTPUT_FILE_OPTION,
output_labels: OUTPUT_FILE_OPTION,
sampling_strategy: str = "auto",
sampling_strategy: Annotated[SMOTETomekSamplingStrategy, typer.Option()] = SMOTETomekSamplingStrategy.auto,
random_state: Optional[int] = None,
):
"""Resample feature data using SMOTETomek."""
Expand Down

0 comments on commit e6dc779

Please sign in to comment.