From ef87fff5721ec45e336f2981a3baafc1fa86ed4d Mon Sep 17 00:00:00 2001 From: Guillaume Lemaitre Date: Sun, 14 Feb 2021 20:33:31 +0100 Subject: [PATCH] DOC use tilde in mod func class --- doc/datasets/index.rst | 8 ++++---- doc/miscellaneous.rst | 7 ++++--- examples/datasets/plot_make_imbalance.py | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/doc/datasets/index.rst b/doc/datasets/index.rst index 8a89df7bb..da24785e9 100644 --- a/doc/datasets/index.rst +++ b/doc/datasets/index.rst @@ -6,10 +6,10 @@ Dataset loading utilities .. currentmodule:: imblearn.datasets -The ``imblearn.datasets`` package is complementing the ``sklearn.datasets`` -package. The package provides both: (i) a set of imbalanced datasets to perform -systematic benchmark and (ii) a utility to create an imbalanced dataset from an -original balanced dataset. +The :mod:`imblearn.datasets` package is complementing the +:mod:`sklearn.datasets` package. The package provides both: (i) a set of +imbalanced datasets to perform systematic benchmark and (ii) a utility to +create an imbalanced dataset from an original balanced dataset. .. _zenodo: diff --git a/doc/miscellaneous.rst b/doc/miscellaneous.rst index a836eed6f..3c406276e 100644 --- a/doc/miscellaneous.rst +++ b/doc/miscellaneous.rst @@ -69,7 +69,7 @@ will generate balanced mini-batches. TensorFlow generator ~~~~~~~~~~~~~~~~~~~~ -The :func:`imblearn.tensorflow.balanced_batch_generator` allow to generate +The :func:`~imblearn.tensorflow.balanced_batch_generator` allow to generate balanced mini-batches using an imbalanced-learn sampler which returns indices:: >>> X = X.astype(np.float32) @@ -143,8 +143,9 @@ define a logistic regression model:: >>> model.compile(optimizer='sgd', loss='categorical_crossentropy', ... metrics=['accuracy']) -:func:`imblearn.keras.balanced_batch_generator` creates a balanced mini-batches -generator with the associated number of mini-batches which will be generated:: +:func:`~imblearn.keras.balanced_batch_generator` creates a balanced +mini-batches generator with the associated number of mini-batches which will be +generated:: >>> from imblearn.keras import balanced_batch_generator >>> training_generator, steps_per_epoch = balanced_batch_generator( diff --git a/examples/datasets/plot_make_imbalance.py b/examples/datasets/plot_make_imbalance.py index 49a7f710f..d39a13304 100644 --- a/examples/datasets/plot_make_imbalance.py +++ b/examples/datasets/plot_make_imbalance.py @@ -3,9 +3,9 @@ Create an imbalanced dataset ============================ -An illustration of the :func:`imblearn.datasets.make_imbalance` function to +An illustration of the :func:`~imblearn.datasets.make_imbalance` function to create an imbalanced dataset from a balanced dataset. We show the ability of -:func:`imblearn.datasets.make_imbalance` of dealing with Pandas DataFrame. +:func:`~imblearn.datasets.make_imbalance` of dealing with Pandas DataFrame. """