From 77b47e791bff4850bdcdd187cb78187079be76b2 Mon Sep 17 00:00:00 2001 From: Guillaume Lemaitre Date: Wed, 2 Aug 2017 18:46:00 +0200 Subject: [PATCH] DOC mention the multi-class scheme used --- imblearn/combine/smote_enn.py | 3 ++- imblearn/combine/smote_tomek.py | 3 ++- imblearn/ensemble/balance_cascade.py | 3 ++- imblearn/ensemble/easy_ensemble.py | 2 +- imblearn/over_sampling/adasyn.py | 4 ++-- imblearn/over_sampling/random_over_sampler.py | 2 +- imblearn/over_sampling/smote.py | 3 ++- .../prototype_generation/cluster_centroids.py | 2 +- .../prototype_selection/condensed_nearest_neighbour.py | 3 ++- .../prototype_selection/edited_nearest_neighbours.py | 9 ++++++--- .../prototype_selection/instance_hardness_threshold.py | 3 ++- .../prototype_selection/neighbourhood_cleaning_rule.py | 5 ++++- .../prototype_selection/one_sided_selection.py | 4 +++- .../prototype_selection/random_under_sampler.py | 2 +- .../under_sampling/prototype_selection/tomek_links.py | 3 ++- 15 files changed, 33 insertions(+), 18 deletions(-) diff --git a/imblearn/combine/smote_enn.py b/imblearn/combine/smote_enn.py index 92e30ac74..148f4d4bb 100644 --- a/imblearn/combine/smote_enn.py +++ b/imblearn/combine/smote_enn.py @@ -132,7 +132,8 @@ class SMOTEENN(SamplerMixin): ----- The method is presented in [1]_. - Supports mutli-class resampling. + Supports mutli-class resampling. Refer to SMOTE and ENN regarding the + scheme which used. Examples -------- diff --git a/imblearn/combine/smote_tomek.py b/imblearn/combine/smote_tomek.py index fc1e68e04..949c96906 100644 --- a/imblearn/combine/smote_tomek.py +++ b/imblearn/combine/smote_tomek.py @@ -102,7 +102,8 @@ class SMOTETomek(SamplerMixin): ----- The methos is presented in [1]_. - Supports mutli-class resampling. + Supports mutli-class resampling. Refer to SMOTE and TomekLinks regarding + the scheme which used. Examples -------- diff --git a/imblearn/ensemble/balance_cascade.py b/imblearn/ensemble/balance_cascade.py index 17bf08123..f7984f1d0 100644 --- a/imblearn/ensemble/balance_cascade.py +++ b/imblearn/ensemble/balance_cascade.py @@ -90,7 +90,8 @@ class BalanceCascade(BaseEnsembleSampler): ----- The method is described in [1]_. - Supports mutli-class resampling. + Supports mutli-class resampling. A one-vs.-rest scheme is used as + originally proposed in [1]_. Examples -------- diff --git a/imblearn/ensemble/easy_ensemble.py b/imblearn/ensemble/easy_ensemble.py index 382e15574..ffa69ded3 100644 --- a/imblearn/ensemble/easy_ensemble.py +++ b/imblearn/ensemble/easy_ensemble.py @@ -59,7 +59,7 @@ class EasyEnsemble(BaseEnsembleSampler): ----- The method is described in [1]_. - Supports mutli-class resampling. + Supports mutli-class resampling by sampling each class independently. Examples -------- diff --git a/imblearn/over_sampling/adasyn.py b/imblearn/over_sampling/adasyn.py index 98fe19a38..710e8fcc8 100644 --- a/imblearn/over_sampling/adasyn.py +++ b/imblearn/over_sampling/adasyn.py @@ -63,10 +63,10 @@ class ADASYN(BaseOverSampler): Notes ----- - Supports mutli-class resampling. - The implementation is based on [1]_. + Supports mutli-class resampling. A one-vs.-rest scheme is used. + Examples -------- diff --git a/imblearn/over_sampling/random_over_sampler.py b/imblearn/over_sampling/random_over_sampler.py index 1d6752813..e39da491c 100644 --- a/imblearn/over_sampling/random_over_sampler.py +++ b/imblearn/over_sampling/random_over_sampler.py @@ -46,7 +46,7 @@ class RandomOverSampler(BaseOverSampler): Notes ----- - Supports mutli-class resampling. + Supports mutli-class resampling by sampling each class independently. Examples -------- diff --git a/imblearn/over_sampling/smote.py b/imblearn/over_sampling/smote.py index 84e360ffb..15ef641ef 100644 --- a/imblearn/over_sampling/smote.py +++ b/imblearn/over_sampling/smote.py @@ -99,7 +99,8 @@ class SMOTE(BaseOverSampler): ----- See the original papers: [1]_, [2]_, [3]_ for more details. - Supports mutli-class resampling. + Supports mutli-class resampling. A one-vs.-rest scheme is used as + originally proposed in [1]_. Examples -------- diff --git a/imblearn/under_sampling/prototype_generation/cluster_centroids.py b/imblearn/under_sampling/prototype_generation/cluster_centroids.py index 42faf7437..9322bfa83 100644 --- a/imblearn/under_sampling/prototype_generation/cluster_centroids.py +++ b/imblearn/under_sampling/prototype_generation/cluster_centroids.py @@ -58,7 +58,7 @@ class ClusterCentroids(BaseUnderSampler): Notes ----- - Supports mutli-class resampling. + Supports mutli-class resampling by sampling each class independently. Examples -------- diff --git a/imblearn/under_sampling/prototype_selection/condensed_nearest_neighbour.py b/imblearn/under_sampling/prototype_selection/condensed_nearest_neighbour.py index cc862db9b..6ea450156 100644 --- a/imblearn/under_sampling/prototype_selection/condensed_nearest_neighbour.py +++ b/imblearn/under_sampling/prototype_selection/condensed_nearest_neighbour.py @@ -75,7 +75,8 @@ class CondensedNearestNeighbour(BaseCleaningSampler): ----- The method is based on [1]_. - Supports mutli-class resampling. + Supports mutli-class resampling. A one-vs.-rest scheme is used when + sampling a class as proposed in [1]_. Examples -------- diff --git a/imblearn/under_sampling/prototype_selection/edited_nearest_neighbours.py b/imblearn/under_sampling/prototype_selection/edited_nearest_neighbours.py index 7fb24a040..6c65502a6 100644 --- a/imblearn/under_sampling/prototype_selection/edited_nearest_neighbours.py +++ b/imblearn/under_sampling/prototype_selection/edited_nearest_neighbours.py @@ -84,7 +84,8 @@ class EditedNearestNeighbours(BaseCleaningSampler): ----- The method is based on [1]_. - Supports mutli-class resampling. + Supports mutli-class resampling. A one-vs.-rest scheme is used when + sampling a class as proposed in [1]_. Examples -------- @@ -272,7 +273,8 @@ class RepeatedEditedNearestNeighbours(BaseCleaningSampler): Notes ----- - The method is based on [1]_. + The method is based on [1]_. A one-vs.-rest scheme is used when + sampling a class as proposed in [1]_. Supports mutli-class resampling. @@ -482,7 +484,8 @@ class AllKNN(BaseCleaningSampler): ----- The method is based on [1]_. - Supports mutli-class resampling. + Supports mutli-class resampling. A one-vs.-rest scheme is used when + sampling a class as proposed in [1]_. Examples -------- diff --git a/imblearn/under_sampling/prototype_selection/instance_hardness_threshold.py b/imblearn/under_sampling/prototype_selection/instance_hardness_threshold.py index 1b4f1c208..7de2f9cdb 100644 --- a/imblearn/under_sampling/prototype_selection/instance_hardness_threshold.py +++ b/imblearn/under_sampling/prototype_selection/instance_hardness_threshold.py @@ -98,7 +98,8 @@ class InstanceHardnessThreshold(BaseCleaningSampler): ----- The method is based on [1]_. - Supports mutli-class resampling. + Supports mutli-class resampling. A one-vs.-rest scheme is used when + sampling a class as proposed in [1]_. Examples -------- diff --git a/imblearn/under_sampling/prototype_selection/neighbourhood_cleaning_rule.py b/imblearn/under_sampling/prototype_selection/neighbourhood_cleaning_rule.py index fa998e6cf..95db83a9a 100644 --- a/imblearn/under_sampling/prototype_selection/neighbourhood_cleaning_rule.py +++ b/imblearn/under_sampling/prototype_selection/neighbourhood_cleaning_rule.py @@ -71,7 +71,10 @@ class NeighbourhoodCleaningRule(BaseCleaningSampler): Notes ----- - Supports mutli-class resampling. + See the original paper: [1]_. + + Supports mutli-class resampling. A one-vs.-rest scheme is used when + sampling a class as proposed in [1]_. Examples -------- diff --git a/imblearn/under_sampling/prototype_selection/one_sided_selection.py b/imblearn/under_sampling/prototype_selection/one_sided_selection.py index ae9867c3d..c267bce80 100644 --- a/imblearn/under_sampling/prototype_selection/one_sided_selection.py +++ b/imblearn/under_sampling/prototype_selection/one_sided_selection.py @@ -74,7 +74,9 @@ class OneSidedSelection(BaseCleaningSampler): ----- The method is based on [1]_. - Supports mutli-class resampling. + Supports mutli-class resampling. A one-vs.-one scheme is used when sampling + a class as proposed in [1]_. For each class to be sampled, all samples of + this class and the minority class are used during the sampling procedure. Examples -------- diff --git a/imblearn/under_sampling/prototype_selection/random_under_sampler.py b/imblearn/under_sampling/prototype_selection/random_under_sampler.py index 9817d4db0..4b4ae2395 100644 --- a/imblearn/under_sampling/prototype_selection/random_under_sampler.py +++ b/imblearn/under_sampling/prototype_selection/random_under_sampler.py @@ -52,7 +52,7 @@ class RandomUnderSampler(BaseUnderSampler): Notes ----- - Supports mutli-class resampling. + Supports mutli-class resampling by sampling each class independently. Examples -------- diff --git a/imblearn/under_sampling/prototype_selection/tomek_links.py b/imblearn/under_sampling/prototype_selection/tomek_links.py index 75133ec4c..c3861d379 100644 --- a/imblearn/under_sampling/prototype_selection/tomek_links.py +++ b/imblearn/under_sampling/prototype_selection/tomek_links.py @@ -52,7 +52,8 @@ class TomekLinks(BaseCleaningSampler): ----- This method is based on [1]_. - Supports mutli-class resampling. + Supports mutli-class resampling. A one-vs.-rest scheme is used as + originally proposed in [1]_. Examples --------