From ceb2a7308cee572290bf40922546806f19fca213 Mon Sep 17 00:00:00 2001 From: Lars Reimann Date: Mon, 4 Mar 2024 20:42:48 +0100 Subject: [PATCH] fix: incorrect parameter type --- .../tabular/transformation/_discretizer.py | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/safeds/data/tabular/transformation/_discretizer.py b/src/safeds/data/tabular/transformation/_discretizer.py index 3d887c7df..c5ed6baca 100644 --- a/src/safeds/data/tabular/transformation/_discretizer.py +++ b/src/safeds/data/tabular/transformation/_discretizer.py @@ -19,7 +19,7 @@ class Discretizer(TableTransformer): Parameters ---------- - number_of_bins: float + number_of_bins The number of bins to be created. Raises @@ -28,7 +28,7 @@ class Discretizer(TableTransformer): If the given number_of_bins is less than 2. """ - def __init__(self, number_of_bins: float = 5): + def __init__(self, number_of_bins: int = 5): self._column_names: list[str] | None = None self._wrapped_transformer: sk_KBinsDiscretizer | None = None @@ -44,14 +44,14 @@ def fit(self, table: Table, column_names: list[str] | None) -> Discretizer: Parameters ---------- - table : Table + table The table used to fit the transformer. - column_names : list[str] | None + column_names The list of columns from the table used to fit the transformer. If `None`, all columns are used. Returns ------- - fitted_transformer : TableTransformer + fitted_transformer : The fitted transformer. Raises @@ -99,12 +99,12 @@ def transform(self, table: Table) -> Table: Parameters ---------- - table : Table + table The table to which the learned transformation is applied. Returns ------- - transformed_table : Table + transformed_table : The transformed table. Raises @@ -150,7 +150,7 @@ def is_fitted(self) -> bool: Returns ------- - is_fitted : bool + is_fitted : Whether the transformer is fitted. """ return self._wrapped_transformer is not None @@ -161,7 +161,7 @@ def get_names_of_added_columns(self) -> list[str]: Returns ------- - added_columns : list[str] + added_columns : A list of names of the added columns, ordered as they will appear in the table. Raises @@ -180,7 +180,7 @@ def get_names_of_changed_columns(self) -> list[str]: Returns ------- - changed_columns : list[str] + changed_columns : The list of (potentially) changed column names, as passed to fit. Raises @@ -198,7 +198,7 @@ def get_names_of_removed_columns(self) -> list[str]: Returns ------- - removed_columns : list[str] + removed_columns : A list of names of the removed columns, ordered as they appear in the table the Discretizer was fitted on. Raises