Skip to content

Commit

Permalink
REFACTOR: remove random_state from EnsembleRegressor (not used) (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin-Laurent authored Jan 15, 2025
1 parent 092ef05 commit 0f511e6
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 12 deletions.
8 changes: 0 additions & 8 deletions mapie/estimator/regressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,6 @@ class EnsembleRegressor:
By default ``0``.
random_state: Optional[Union[int, RandomState]]
Pseudo random number generator state used for random sampling.
Pass an int for reproducible output across multiple function calls.
By default ``None``.
Attributes
----------
single_estimator_: sklearn.RegressorMixin
Expand Down Expand Up @@ -161,7 +155,6 @@ def __init__(
cv: Optional[Union[int, str, BaseCrossValidator]],
agg_function: Optional[str],
n_jobs: Optional[int],
random_state: Optional[Union[int, np.random.RandomState]],
test_size: Optional[Union[int, float]],
verbose: int
):
Expand All @@ -170,7 +163,6 @@ def __init__(
self.cv = cv
self.agg_function = agg_function
self.n_jobs = n_jobs
self.random_state = random_state
self.test_size = test_size
self.verbose = verbose

Expand Down
1 change: 0 additions & 1 deletion mapie/regression/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,6 @@ def init_fit(
cv,
agg_function,
self.n_jobs,
self.random_state,
self.test_size,
self.verbose
)
Expand Down
1 change: 0 additions & 1 deletion mapie/tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ def test_warning_when_import_from_estimator():
cv=3,
agg_function="mean",
n_jobs=1,
random_state=0,
test_size=0.2,
verbose=0,
)
2 changes: 0 additions & 2 deletions mapie/tests/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,6 @@ def test_aggregate_with_mask_with_invalid_agg_function() -> None:
KFold(n_splits=5, random_state=None, shuffle=True),
"nonsense",
None,
random_state,
0.20,
False
)
Expand Down Expand Up @@ -1032,7 +1031,6 @@ def test_deprecated_ensemble_regressor_fit_warning() -> None:
KFold(n_splits=5, random_state=None, shuffle=True),
"nonsense",
None,
random_state,
0.20,
False
)
Expand Down

0 comments on commit 0f511e6

Please sign in to comment.