Skip to content

Commit 773d310

Browse files
author
Guillaume Lemaitre
committed
Update doc string
1 parent d50e723 commit 773d310

File tree

7 files changed

+14
-15
lines changed

7 files changed

+14
-15
lines changed

imblearn/combine/smote_enn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class SMOTEENN(BaseBinarySampler):
128128
>>> sme = SMOTEENN(random_state=42)
129129
>>> X_res, y_res = sme.fit_sample(X, y)
130130
>>> print('Resampled dataset shape {}'.format(Counter(y_res)))
131-
Resampled dataset shape Counter({0: 900, 1: 865})
131+
Resampled dataset shape Counter({0: 900, 1: 881})
132132
133133
References
134134
----------

imblearn/over_sampling/adasyn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class ADASYN(BaseBinarySampler):
8484
>>> ada = ADASYN(random_state=42)
8585
>>> X_res, y_res = ada.fit_sample(X, y)
8686
>>> print('Resampled dataset shape {}'.format(Counter(y_res)))
87-
Resampled dataset shape Counter({0: 909, 1: 900})
87+
Resampled dataset shape Counter({0: 904, 1: 900})
8888
8989
References
9090
----------

imblearn/pipeline.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ class Pipeline(pipeline.Pipeline):
103103
>>> print(classification_report(y_test, y_hat))
104104
precision recall f1-score support
105105
<BLANKLINE>
106-
0 0.71 1.00 0.83 24
107-
1 1.00 0.96 0.98 226
106+
0 0.87 1.00 0.93 26
107+
1 1.00 0.98 0.99 224
108108
<BLANKLINE>
109-
avg / total 0.97 0.96 0.96 250
109+
avg / total 0.99 0.98 0.98 250
110110
<BLANKLINE>
111111
112112
"""

imblearn/under_sampling/edited_nearest_neighbours.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class EditedNearestNeighbours(BaseMulticlassSampler):
9191
>>> enn = EditedNearestNeighbours(random_state=42)
9292
>>> X_res, y_res = enn.fit_sample(X, y)
9393
>>> print('Resampled dataset shape {}'.format(Counter(y_res)))
94-
Resampled dataset shape Counter({1: 883, 0: 100})
94+
Resampled dataset shape Counter({1: 887, 0: 100})
9595
9696
References
9797
----------
@@ -331,7 +331,7 @@ class RepeatedEditedNearestNeighbours(BaseMulticlassSampler):
331331
>>> renn = RepeatedEditedNearestNeighbours(random_state=42)
332332
>>> X_res, y_res = renn.fit_sample(X, y)
333333
>>> print('Resampled dataset shape {}'.format(Counter(y_res)))
334-
Resampled dataset shape Counter({1: 883, 0: 100})
334+
Resampled dataset shape Counter({1: 887, 0: 100})
335335
336336
References
337337
----------
@@ -576,7 +576,7 @@ class AllKNN(BaseMulticlassSampler):
576576
>>> allknn = AllKNN(random_state=42)
577577
>>> X_res, y_res = allknn.fit_sample(X, y)
578578
>>> print('Resampled dataset shape {}'.format(Counter(y_res)))
579-
Resampled dataset shape Counter({1: 883, 0: 100})
579+
Resampled dataset shape Counter({1: 887, 0: 100})
580580
581581
References
582582
----------

imblearn/under_sampling/instance_hardness_threshold.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,16 @@ class InstanceHardnessThreshold(BaseBinarySampler):
103103
104104
>>> from collections import Counter
105105
>>> from sklearn.datasets import make_classification
106-
>>> from imblearn.under_sampling import \
107-
RepeatedEditedNearestNeighbours # doctest: +NORMALIZE_WHITESPACE
106+
>>> from imblearn.under_sampling import InstanceHardnessThreshold
108107
>>> X, y = make_classification(n_classes=2, class_sep=2,
109108
... weights=[0.1, 0.9], n_informative=3, n_redundant=1, flip_y=0,
110109
... n_features=20, n_clusters_per_class=1, n_samples=1000, random_state=10)
111110
>>> print('Original dataset shape {}'.format(Counter(y)))
112111
Original dataset shape Counter({1: 900, 0: 100})
113-
>>> renn = RepeatedEditedNearestNeighbours(random_state=42)
114-
>>> X_res, y_res = renn.fit_sample(X, y)
112+
>>> iht = InstanceHardnessThreshold(random_state=42)
113+
>>> X_res, y_res = iht.fit_sample(X, y)
115114
>>> print('Resampled dataset shape {}'.format(Counter(y_res)))
116-
Resampled dataset shape Counter({1: 883, 0: 100})
115+
Resampled dataset shape Counter({1: 811, 0: 100})
117116
118117
References
119118
----------

imblearn/under_sampling/neighbourhood_cleaning_rule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class NeighbourhoodCleaningRule(BaseMulticlassSampler):
7777
>>> ncr = NeighbourhoodCleaningRule(random_state=42)
7878
>>> X_res, y_res = ncr.fit_sample(X, y)
7979
>>> print('Resampled dataset shape {}'.format(Counter(y_res)))
80-
Resampled dataset shape Counter({1: 884, 0: 100})
80+
Resampled dataset shape Counter({1: 891, 0: 100})
8181
8282
References
8383
----------

imblearn/under_sampling/one_sided_selection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class OneSidedSelection(BaseBinarySampler):
8282
>>> oss = OneSidedSelection(random_state=42)
8383
>>> X_res, y_res = oss.fit_sample(X, y)
8484
>>> print('Resampled dataset shape {}'.format(Counter(y_res)))
85-
Resampled dataset shape Counter({1: 595, 0: 100})
85+
Resampled dataset shape Counter({1: 496, 0: 100})
8686
8787
References
8888
----------

0 commit comments

Comments
 (0)