Skip to content

Commit 85d1f66

Browse files
committed
iter
1 parent 59cd732 commit 85d1f66

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

imblearn/misc.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ class FunctionSampler(SamplerMixin):
4343
4444
Examples
4545
--------
46-
>>> from sklearn.datasets import fetch_mldata
46+
>>> from sklearn.datasets import make_classification
4747
>>> from imblearn.misc import FunctionSampler
48-
>>> pima = fetch_mldata('diabetes_scale')
49-
>>> X, y = pima['data'], pima['target']
48+
>>> X, y = make_classification(n_classes=2, class_sep=2,
49+
... weights=[0.1, 0.9], n_informative=3, n_redundant=1, flip_y=0,
50+
... n_features=20, n_clusters_per_class=1, n_samples=1000, random_state=10)
5051
5152
We can create to select only the first ten samples for instance.
5253
@@ -71,7 +72,7 @@ class FunctionSampler(SamplerMixin):
7172
>>> X_res, y_res = sampler.fit_sample(X, y)
7273
>>> print('Resampled dataset shape {}'.format(
7374
... sorted(Counter(y_res).items())))
74-
Resampled dataset shape [(-1, 268), (1, 268)]
75+
Resampled dataset shape [(0, 100), (1, 100)]
7576
7677
"""
7778

0 commit comments

Comments
 (0)