imblearn/under_sampling/_prototype_selection/_random_under_sampler.py
Killed 13 out of 21 mutantsSurvived
Survived mutation testing. These mutants show holes in your test suite.Mutant 361
--- imblearn/under_sampling/_prototype_selection/_random_under_sampler.py
+++ imblearn/under_sampling/_prototype_selection/_random_under_sampler.py
@@ -72,7 +72,6 @@
Resampled dataset shape Counter({{0: 100, 1: 100}})
"""
- @_deprecate_positional_args
def __init__(
self, *, sampling_strategy="auto", random_state=None, replacement=False
):
Mutant 362
--- imblearn/under_sampling/_prototype_selection/_random_under_sampler.py
+++ imblearn/under_sampling/_prototype_selection/_random_under_sampler.py
@@ -74,7 +74,7 @@
@_deprecate_positional_args
def __init__(
- self, *, sampling_strategy="auto", random_state=None, replacement=False
+ self, *, sampling_strategy="XXautoXX", random_state=None, replacement=False
):
super().__init__(sampling_strategy=sampling_strategy)
self.random_state = random_state
Mutant 363
--- imblearn/under_sampling/_prototype_selection/_random_under_sampler.py
+++ imblearn/under_sampling/_prototype_selection/_random_under_sampler.py
@@ -74,7 +74,7 @@
@_deprecate_positional_args
def __init__(
- self, *, sampling_strategy="auto", random_state=None, replacement=False
+ self, *, sampling_strategy="auto", random_state=None, replacement=True
):
super().__init__(sampling_strategy=sampling_strategy)
self.random_state = random_state
Mutant 364
--- imblearn/under_sampling/_prototype_selection/_random_under_sampler.py
+++ imblearn/under_sampling/_prototype_selection/_random_under_sampler.py
@@ -77,7 +77,7 @@
self, *, sampling_strategy="auto", random_state=None, replacement=False
):
super().__init__(sampling_strategy=sampling_strategy)
- self.random_state = random_state
+ self.random_state = None
self.replacement = replacement
def _check_X_y(self, X, y):
Mutant 365
--- imblearn/under_sampling/_prototype_selection/_random_under_sampler.py
+++ imblearn/under_sampling/_prototype_selection/_random_under_sampler.py
@@ -78,7 +78,7 @@
):
super().__init__(sampling_strategy=sampling_strategy)
self.random_state = random_state
- self.replacement = replacement
+ self.replacement = None
def _check_X_y(self, X, y):
y, binarize_y = check_target_type(y, indicate_one_vs_all=True)
Mutant 369
--- imblearn/under_sampling/_prototype_selection/_random_under_sampler.py
+++ imblearn/under_sampling/_prototype_selection/_random_under_sampler.py
@@ -83,7 +83,7 @@
def _check_X_y(self, X, y):
y, binarize_y = check_target_type(y, indicate_one_vs_all=True)
X, y = self._validate_data(
- X, y, reset=True, accept_sparse=["csr", "csc"], dtype=None,
+ X, y, reset=True, accept_sparse=["XXcsrXX", "csc"], dtype=None,
force_all_finite=False,
)
return X, y, binarize_y
Mutant 370
--- imblearn/under_sampling/_prototype_selection/_random_under_sampler.py
+++ imblearn/under_sampling/_prototype_selection/_random_under_sampler.py
@@ -83,7 +83,7 @@
def _check_X_y(self, X, y):
y, binarize_y = check_target_type(y, indicate_one_vs_all=True)
X, y = self._validate_data(
- X, y, reset=True, accept_sparse=["csr", "csc"], dtype=None,
+ X, y, reset=True, accept_sparse=["csr", "XXcscXX"], dtype=None,
force_all_finite=False,
)
return X, y, binarize_y
Mutant 371
--- imblearn/under_sampling/_prototype_selection/_random_under_sampler.py
+++ imblearn/under_sampling/_prototype_selection/_random_under_sampler.py
@@ -84,7 +84,7 @@
y, binarize_y = check_target_type(y, indicate_one_vs_all=True)
X, y = self._validate_data(
X, y, reset=True, accept_sparse=["csr", "csc"], dtype=None,
- force_all_finite=False,
+ force_all_finite=True,
)
return X, y, binarize_y