From 2b0c106d2baf1c32bc4cb25fc8ca20fa2bb26da7 Mon Sep 17 00:00:00 2001 From: Sebastian Raschka Date: Fri, 25 Aug 2017 04:16:04 -0400 Subject: [PATCH 1/5] DOC Minor rephrasing in the combine doc (#330) * minor rephrasing in the combine doc * Update combine.rst --- doc/combine.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/combine.rst b/doc/combine.rst index e4cdc0c23..165fcc7f0 100644 --- a/doc/combine.rst +++ b/doc/combine.rst @@ -8,19 +8,19 @@ Combination of over- and under-sampling We previously presented :class:`SMOTE` and showed that this method can generate noisy samples by interpolating new points between marginal outliers and -inliers. This issue can be solved by cleaning the resulted space obtained -after over-sampling. +inliers. This issue can be solved by cleaning the space resulting +from over-sampling. .. currentmodule:: imblearn.combine In this regard, Tomek's link and edited nearest-neighbours are the two cleaning -methods which have been added pipeline after SMOTE over-sampling to obtain a -cleaner space. Therefore, imbalanced-learn implemented two ready-to-use class -which pipeline both over- and under-sampling methods: (i) :class:`SMOTETomek` +methods that have been added to the pipeline after applying SMOTE over-sampling +to obtain a cleaner space. The two ready-to use classes imbalanced-learn implements +for combining over- and undersampling methods are: (i) :class:`SMOTETomek` and (ii) :class:`SMOTEENN`. -These two classes can be used as any other sampler with identical parameters -than their former samplers:: +Those two classes can be used like any other sampler with parameters identical +to their former samplers:: >>> from collections import Counter >>> from sklearn.datasets import make_classification From 0f24ab409f603d5fbdc3f5fd3f6fb77893532a3f Mon Sep 17 00:00:00 2001 From: Guillaume Lemaitre Date: Fri, 25 Aug 2017 18:03:11 +0200 Subject: [PATCH 2/5] DOC add threshold_cleaning in NCR (#335) * DOC add threshold_cleaning parameter in the docstring * DOC remove useless line * DOC plain text instead of latex * DOC plain text instead of latex --- .../prototype_selection/neighbourhood_cleaning_rule.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/imblearn/under_sampling/prototype_selection/neighbourhood_cleaning_rule.py b/imblearn/under_sampling/prototype_selection/neighbourhood_cleaning_rule.py index e9f16e6a8..7b49081c7 100644 --- a/imblearn/under_sampling/prototype_selection/neighbourhood_cleaning_rule.py +++ b/imblearn/under_sampling/prototype_selection/neighbourhood_cleaning_rule.py @@ -73,6 +73,15 @@ class NeighbourhoodCleaningRule(BaseCleaningSampler): :class:`sklearn.neighbors.base.KNeighborsMixin` that will be used to find the nearest-neighbors. + threshold_cleaning : float, optional (default=0.5) + Threshold used to whether consider a class or not during the cleaning + after applying ENN. A class will be considered during cleaning when: + + Ci > C x T , + + where Ci and C is the number of samples in the class and the data set, + respectively and theta is the threshold. + n_jobs : int, optional (default=1) The number of threads to open if possible. From ffd638ac865b4685289b797374a87aadd967e3fb Mon Sep 17 00:00:00 2001 From: chkoar Date: Mon, 28 Aug 2017 17:02:27 +0300 Subject: [PATCH 3/5] DOC correct project name in documentation (#336) --- doc/developers_utils.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/developers_utils.rst b/doc/developers_utils.rst index ed4f34767..04d6fbe55 100644 --- a/doc/developers_utils.rst +++ b/doc/developers_utils.rst @@ -12,8 +12,8 @@ All the following functions and classes are in the module :mod:`imblearn.utils`. These utilities are meant to be used internally within the imbalanced-learn package. They are not guaranteed to be stable between versions of - imbalance-learn. Backports, in particular, will be removed as the - imbalance-learn dependencies evolve. + imbalanced-learn. Backports, in particular, will be removed as the + imbalanced-learn dependencies evolve. Validation Tools @@ -97,7 +97,7 @@ same information as the deprecation warning as explained above. Use the ``k`` was renamed to ``n_clusters`` in version 0.13 and will be removed in 0.15. -On the top of all the functionality provided by scikit-learn. Imbalance-learn +On the top of all the functionality provided by scikit-learn. imbalanced-learn provides :func:`deprecate_parameter`: which is used to deprecate a sampler's parameter (attribute) by another one. From c06d7f42ae4cd24851980e4ac17989280eb27b97 Mon Sep 17 00:00:00 2001 From: Guillaume Lemaitre Date: Sat, 7 Oct 2017 13:19:16 +0200 Subject: [PATCH 4/5] MAINT downgrade sphinx-gallery to 0.1.11 for the moment (#348) --- build_tools/circle/build_doc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/circle/build_doc.sh b/build_tools/circle/build_doc.sh index b3ce62a29..2e3547d78 100755 --- a/build_tools/circle/build_doc.sh +++ b/build_tools/circle/build_doc.sh @@ -93,7 +93,7 @@ source activate $CONDA_ENV_NAME conda install --yes pip numpy scipy scikit-learn pillow matplotlib sphinx \ sphinx_rtd_theme numpydoc -pip install sphinx-gallery +pip install sphinx-gallery==0.1.11 # Build and install imbalanced-learn in dev mode cd "$HOME/$CIRCLE_PROJECT_REPONAME" From 29a36ccf6a448ff4df371781c1ce72898e93a6a9 Mon Sep 17 00:00:00 2001 From: Guillaume Lemaitre Date: Mon, 9 Oct 2017 16:14:58 +0200 Subject: [PATCH 5/5] Release 0.3.1 --- conda-recipe/imbalanced-learn/meta.yaml | 8 ++++++-- doc/conf.py | 2 +- imblearn/version.py | 2 +- setup.cfg | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/conda-recipe/imbalanced-learn/meta.yaml b/conda-recipe/imbalanced-learn/meta.yaml index 815a9b7af..988e8ba59 100644 --- a/conda-recipe/imbalanced-learn/meta.yaml +++ b/conda-recipe/imbalanced-learn/meta.yaml @@ -1,11 +1,15 @@ package: name: imbalanced-learn - version: "0.3.0" + version: "0.3.1" source: - git_rev: 0.3.0 + git_rev: 0.3.1 git_url: https://github.com/scikit-learn-contrib/imbalanced-learn.git +build: + number: 0 + noarch: python + requirements: build: - python diff --git a/doc/conf.py b/doc/conf.py index 35ae38bfd..79607c8fc 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -103,7 +103,7 @@ # built documents. # # The short X.Y version. -__version__ = '0.3.0' +__version__ = '0.3.1' version = __version__ # The full version, including alpha/beta/rc tags. release = __version__ diff --git a/imblearn/version.py b/imblearn/version.py index 85a931135..d8dd499ca 100644 --- a/imblearn/version.py +++ b/imblearn/version.py @@ -21,7 +21,7 @@ # Dev branch marker is: 'X.Y.dev' or 'X.Y.devN' where N is an integer. # 'X.Y.dev0' is the canonical version of 'X.Y.dev' # -__version__ = '0.3.0' +__version__ = '0.3.1' _IMBALANCED_DATASET_INSTALL_MSG = 'See %s for installation information.' % ( 'http://contrib.scikit-learn.org/imbalanced-learn/install.html') diff --git a/setup.cfg b/setup.cfg index adfa31708..5b42e7289 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.3.0 +current_version = 0.3.1 tag = False parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\.(?P[a-z]+)(?P\d+))? serialize =