From cfc73bc118b8784927247b0d01b17a02970c000a Mon Sep 17 00:00:00 2001 From: Guillaume Lemaitre Date: Tue, 26 Jul 2016 00:35:30 +0200 Subject: [PATCH] Address issue #107 - ADASYN docstring (#108) --- imblearn/over_sampling/adasyn.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/imblearn/over_sampling/adasyn.py b/imblearn/over_sampling/adasyn.py index 14cb729cc..ac7b2f90c 100644 --- a/imblearn/over_sampling/adasyn.py +++ b/imblearn/over_sampling/adasyn.py @@ -65,17 +65,17 @@ class ADASYN(SamplerMixin): >>> from collections import Counter >>> from sklearn.datasets import make_classification - >>> from imblearn.under_sampling import TomekLinks + >>> from imblearn.over_sampling import ADASYN >>> X, y = make_classification(n_classes=2, class_sep=2, weights=[0.1, 0.9], ... n_informative=3, n_redundant=1, flip_y=0, ... n_features=20, n_clusters_per_class=1, ... n_samples=1000, random_state=10) >>> print('Original dataset shape {}'.format(Counter(y))) Original dataset shape Counter({1: 900, 0: 100}) - >>> tl = TomekLinks(random_state=42) - >>> X_res, y_res = tl.fit_sample(X, y) + >>> ada = ADASYN(random_state=42) + >>> X_res, y_res = ada.fit_sample(X, y) >>> print('Resampled dataset shape {}'.format(Counter(y_res))) - Resampled dataset shape Counter({1: 897, 0: 100}) + Resampled dataset shape Counter({0: 909, 1: 900}) References ----------