Skip to content

Commit 335f89b

Browse files
committed
example for over sampling
1 parent 904417b commit 335f89b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tensorlayer/utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,12 @@ def class_balancing_oversample(X_train=None, y_train=None, printable=True):
344344
345345
Examples
346346
--------
347+
- One X
347348
>>> X_train, y_train = class_balancing_oversample(X_train, y_train, printable=True)
349+
- Two X
350+
>>> X, y = tl.utils.class_balancing_oversample(X_train=np.hstack((X1, X2)), y_train=y, printable=False)
351+
>>> X1 = X[:, 0:5]
352+
>>> X2 = X[:, 5:]
348353
"""
349354
# ======== Classes balancing
350355
if printable:

0 commit comments

Comments
 (0)