@@ -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 ----------
0 commit comments