@@ -19,7 +19,7 @@ class Discretizer(TableTransformer):
19
19
20
20
Parameters
21
21
----------
22
- number_of_bins: float
22
+ number_of_bins
23
23
The number of bins to be created.
24
24
25
25
Raises
@@ -28,7 +28,7 @@ class Discretizer(TableTransformer):
28
28
If the given number_of_bins is less than 2.
29
29
"""
30
30
31
- def __init__ (self , number_of_bins : float = 5 ):
31
+ def __init__ (self , number_of_bins : int = 5 ):
32
32
self ._column_names : list [str ] | None = None
33
33
self ._wrapped_transformer : sk_KBinsDiscretizer | None = None
34
34
@@ -44,14 +44,14 @@ def fit(self, table: Table, column_names: list[str] | None) -> Discretizer:
44
44
45
45
Parameters
46
46
----------
47
- table : Table
47
+ table
48
48
The table used to fit the transformer.
49
- column_names : list[str] | None
49
+ column_names
50
50
The list of columns from the table used to fit the transformer. If `None`, all columns are used.
51
51
52
52
Returns
53
53
-------
54
- fitted_transformer : TableTransformer
54
+ fitted_transformer :
55
55
The fitted transformer.
56
56
57
57
Raises
@@ -99,12 +99,12 @@ def transform(self, table: Table) -> Table:
99
99
100
100
Parameters
101
101
----------
102
- table : Table
102
+ table
103
103
The table to which the learned transformation is applied.
104
104
105
105
Returns
106
106
-------
107
- transformed_table : Table
107
+ transformed_table :
108
108
The transformed table.
109
109
110
110
Raises
@@ -150,7 +150,7 @@ def is_fitted(self) -> bool:
150
150
151
151
Returns
152
152
-------
153
- is_fitted : bool
153
+ is_fitted :
154
154
Whether the transformer is fitted.
155
155
"""
156
156
return self ._wrapped_transformer is not None
@@ -161,7 +161,7 @@ def get_names_of_added_columns(self) -> list[str]:
161
161
162
162
Returns
163
163
-------
164
- added_columns : list[str]
164
+ added_columns :
165
165
A list of names of the added columns, ordered as they will appear in the table.
166
166
167
167
Raises
@@ -180,7 +180,7 @@ def get_names_of_changed_columns(self) -> list[str]:
180
180
181
181
Returns
182
182
-------
183
- changed_columns : list[str]
183
+ changed_columns :
184
184
The list of (potentially) changed column names, as passed to fit.
185
185
186
186
Raises
@@ -198,7 +198,7 @@ def get_names_of_removed_columns(self) -> list[str]:
198
198
199
199
Returns
200
200
-------
201
- removed_columns : list[str]
201
+ removed_columns :
202
202
A list of names of the removed columns, ordered as they appear in the table the Discretizer was fitted on.
203
203
204
204
Raises
0 commit comments