imblearn/base.py
Killed 11 out of 22 mutantsSurvived
Survived mutation testing. These mutants show holes in your test suite.Mutant 38
--- imblearn/base.py
+++ imblearn/base.py
@@ -24,7 +24,7 @@
instead.
"""
- _estimator_type = "sampler"
+ _estimator_type = "XXsamplerXX"
def fit(self, X, y):
"""Check inputs and statistics of the sampler.
Mutant 39
--- imblearn/base.py
+++ imblearn/base.py
@@ -24,7 +24,7 @@
instead.
"""
- _estimator_type = "sampler"
+ _estimator_type = None
def fit(self, X, y):
"""Check inputs and statistics of the sampler.
Mutant 50
--- imblearn/base.py
+++ imblearn/base.py
@@ -86,7 +86,7 @@
if binarize_y else output[1])
X_, y_ = arrays_transformer.transform(output[0], y_)
- return (X_, y_) if len(output) == 2 else (X_, y_, output[2])
+ return (X_, y_) if len(output) == 2 else (X_, y_, output[3])
# define an alias for back-compatibility
fit_sample = fit_resample
Mutant 51
--- imblearn/base.py
+++ imblearn/base.py
@@ -89,7 +89,7 @@
return (X_, y_) if len(output) == 2 else (X_, y_, output[2])
# define an alias for back-compatibility
- fit_sample = fit_resample
+ fit_sample = None
@abstractmethod
def _fit_resample(self, X, y):
Mutant 52
--- imblearn/base.py
+++ imblearn/base.py
@@ -91,7 +91,6 @@
# define an alias for back-compatibility
fit_sample = fit_resample
- @abstractmethod
def _fit_resample(self, X, y):
"""Base method defined in each sampler to defined the sampling
strategy.
Mutant 53
--- imblearn/base.py
+++ imblearn/base.py
@@ -124,7 +124,7 @@
instead.
"""
- def __init__(self, sampling_strategy="auto"):
+ def __init__(self, sampling_strategy="XXautoXX"):
self.sampling_strategy = sampling_strategy
def _check_X_y(self, X, y, accept_sparse=None):
Mutant 55
--- imblearn/base.py
+++ imblearn/base.py
@@ -212,7 +212,7 @@
Resampled dataset shape [(0, 100), (1, 100)]
"""
- _sampling_type = "bypass"
+ _sampling_type = "XXbypassXX"
@_deprecate_positional_args
def __init__(self, *, func=None, accept_sparse=True, kw_args=None,
Mutant 56
--- imblearn/base.py
+++ imblearn/base.py
@@ -212,7 +212,7 @@
Resampled dataset shape [(0, 100), (1, 100)]
"""
- _sampling_type = "bypass"
+ _sampling_type = None
@_deprecate_positional_args
def __init__(self, *, func=None, accept_sparse=True, kw_args=None,
Mutant 57
--- imblearn/base.py
+++ imblearn/base.py
@@ -214,7 +214,6 @@
_sampling_type = "bypass"
- @_deprecate_positional_args
def __init__(self, *, func=None, accept_sparse=True, kw_args=None,
validate=True):
super().__init__()
Mutant 58
--- imblearn/base.py
+++ imblearn/base.py
@@ -215,7 +215,7 @@
_sampling_type = "bypass"
@_deprecate_positional_args
- def __init__(self, *, func=None, accept_sparse=True, kw_args=None,
+ def __init__(self, *, func=None, accept_sparse=False, kw_args=None,
validate=True):
super().__init__()
self.func = func
Mutant 59
--- imblearn/base.py
+++ imblearn/base.py
@@ -216,7 +216,7 @@
@_deprecate_positional_args
def __init__(self, *, func=None, accept_sparse=True, kw_args=None,
- validate=True):
+ validate=False):
super().__init__()
self.func = func
self.accept_sparse = accept_sparse