imblearn/over_sampling/_smote.py

Killed 0 out of 25 mutants

Survived

Survived mutation testing. These mutants show holes in your test suite.

Mutant 423

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -57,7 +57,7 @@
         )
 
     def _make_samples(
-        self, X, y_dtype, y_type, nn_data, nn_num, n_samples, step_size=1.0
+        self, X, y_dtype, y_type, nn_data, nn_num, n_samples, step_size=2.0
     ):
         """A support function that returns artificial samples constructed along
         the line connecting nearest neighbours.

Mutant 424

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -161,7 +161,7 @@
         return X_new.astype(X.dtype)
 
     def _in_danger_noise(
-        self, nn_estimator, samples, target_class, y, kind="danger"
+        self, nn_estimator, samples, target_class, y, kind="XXdangerXX"
     ):
         """Estimate if a set of sample are in danger or noise.
 

Mutant 425

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -297,7 +297,6 @@
     Resampled dataset shape Counter({{0: 900, 1: 900}})
     """
 
-    @_deprecate_positional_args
     def __init__(
         self,
         *,

Mutant 426

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -301,7 +301,7 @@
     def __init__(
         self,
         *,
-        sampling_strategy="auto",
+        sampling_strategy="XXautoXX",
         random_state=None,
         k_neighbors=5,
         n_jobs=None,

Mutant 427

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -303,7 +303,7 @@
         *,
         sampling_strategy="auto",
         random_state=None,
-        k_neighbors=5,
+        k_neighbors=6,
         n_jobs=None,
         m_neighbors=10,
         kind="borderline-1",

Mutant 428

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -305,7 +305,7 @@
         random_state=None,
         k_neighbors=5,
         n_jobs=None,
-        m_neighbors=10,
+        m_neighbors=11,
         kind="borderline-1",
     ):
         super().__init__(

Mutant 429

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -306,7 +306,7 @@
         k_neighbors=5,
         n_jobs=None,
         m_neighbors=10,
-        kind="borderline-1",
+        kind="XXborderline-1XX",
     ):
         super().__init__(
             sampling_strategy=sampling_strategy,

Mutant 430

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -497,7 +497,6 @@
     Resampled dataset shape Counter({{0: 900, 1: 900}})
     """
 
-    @_deprecate_positional_args
     def __init__(
         self,
         *,

Mutant 431

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -501,7 +501,7 @@
     def __init__(
         self,
         *,
-        sampling_strategy="auto",
+        sampling_strategy="XXautoXX",
         random_state=None,
         k_neighbors=5,
         n_jobs=None,

Mutant 432

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -503,7 +503,7 @@
         *,
         sampling_strategy="auto",
         random_state=None,
-        k_neighbors=5,
+        k_neighbors=6,
         n_jobs=None,
         m_neighbors=10,
         svm_estimator=None,

Mutant 433

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -505,7 +505,7 @@
         random_state=None,
         k_neighbors=5,
         n_jobs=None,
-        m_neighbors=10,
+        m_neighbors=11,
         svm_estimator=None,
         out_step=0.5,
     ):

Mutant 434

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -507,7 +507,7 @@
         n_jobs=None,
         m_neighbors=10,
         svm_estimator=None,
-        out_step=0.5,
+        out_step=1.5,
     ):
         super().__init__(
             sampling_strategy=sampling_strategy,

Mutant 435

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -700,7 +700,6 @@
     Resampled dataset shape Counter({{0: 900, 1: 900}})
     """
 
-    @_deprecate_positional_args
     def __init__(
         self,
         *,

Mutant 436

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -704,7 +704,7 @@
     def __init__(
         self,
         *,
-        sampling_strategy="auto",
+        sampling_strategy="XXautoXX",
         random_state=None,
         k_neighbors=5,
         n_jobs=None,

Mutant 437

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -706,7 +706,7 @@
         *,
         sampling_strategy="auto",
         random_state=None,
-        k_neighbors=5,
+        k_neighbors=6,
         n_jobs=None,
     ):
         super().__init__(

Mutant 438

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -877,7 +877,7 @@
     Resampled dataset samples per class Counter({0: 900, 1: 900})
     """
 
-    _required_parameters = ["categorical_features"]
+    _required_parameters = ["XXcategorical_featuresXX"]
 
     @_deprecate_positional_args
     def __init__(

Mutant 439

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -877,7 +877,7 @@
     Resampled dataset samples per class Counter({0: 900, 1: 900})
     """
 
-    _required_parameters = ["categorical_features"]
+    _required_parameters = None
 
     @_deprecate_positional_args
     def __init__(

Mutant 440

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -879,7 +879,6 @@
 
     _required_parameters = ["categorical_features"]
 
-    @_deprecate_positional_args
     def __init__(
         self,
         categorical_features,

Mutant 441

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -884,7 +884,7 @@
         self,
         categorical_features,
         *,
-        sampling_strategy="auto",
+        sampling_strategy="XXautoXX",
         random_state=None,
         k_neighbors=5,
         n_jobs=None,

Mutant 442

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -886,7 +886,7 @@
         *,
         sampling_strategy="auto",
         random_state=None,
-        k_neighbors=5,
+        k_neighbors=6,
         n_jobs=None,
     ):
         super().__init__(

Mutant 443

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -1168,7 +1168,6 @@
     More 0 samples: True
     """
 
-    @_deprecate_positional_args
     def __init__(
         self,
         *,

Mutant 444

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -1172,7 +1172,7 @@
     def __init__(
         self,
         *,
-        sampling_strategy="auto",
+        sampling_strategy="XXautoXX",
         random_state=None,
         k_neighbors=2,
         n_jobs=None,

Mutant 445

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -1174,7 +1174,7 @@
         *,
         sampling_strategy="auto",
         random_state=None,
-        k_neighbors=2,
+        k_neighbors=3,
         n_jobs=None,
         kmeans_estimator=None,
         cluster_balance_threshold="auto",

Mutant 446

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -1177,7 +1177,7 @@
         k_neighbors=2,
         n_jobs=None,
         kmeans_estimator=None,
-        cluster_balance_threshold="auto",
+        cluster_balance_threshold="XXautoXX",
         density_exponent="auto",
     ):
         super().__init__(

Mutant 447

--- imblearn/over_sampling/_smote.py
+++ imblearn/over_sampling/_smote.py
@@ -1178,7 +1178,7 @@
         n_jobs=None,
         kmeans_estimator=None,
         cluster_balance_threshold="auto",
-        density_exponent="auto",
+        density_exponent="XXautoXX",
     ):
         super().__init__(
             sampling_strategy=sampling_strategy,