New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] Reorganise under-sampling methods #277

Merged
merged 8 commits into from Apr 29, 2017

Conversation

Projects
None yet
2 participants
@glemaitre
Member

glemaitre commented Mar 29, 2017

Reference Issue

Fixes #275

What does this implement/fix? Explain your changes.

Any other comments?

@codecov

This comment has been minimized.

codecov bot commented Mar 29, 2017

Codecov Report

Merging #277 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #277      +/-   ##
==========================================
+ Coverage   98.18%   98.19%   +<.01%     
==========================================
  Files          60       62       +2     
  Lines        3531     3544      +13     
==========================================
+ Hits         3467     3480      +13     
  Misses         64       64
Impacted Files Coverage Δ
...election/tests/test_instance_hardness_threshold.py 100% <ø> (ø)
...ampling/prototype_selection/tests/test_nearmiss.py 100% <ø> (ø)
...n/tests/test_repeated_edited_nearest_neighbours.py 100% <ø> (ø)
...election/tests/test_condensed_nearest_neighbour.py 100% <ø> (ø)
..._selection/tests/test_edited_nearest_neighbours.py 100% <ø> (ø)
..._sampling/prototype_selection/tests/test_allknn.py 100% <ø> (ø)
...otype_selection/tests/test_random_under_sampler.py 100% <ø> (ø)
...ling/prototype_selection/tests/test_tomek_links.py 100% <ø> (ø)
...totype_selection/tests/test_one_sided_selection.py 100% <ø> (ø)
...election/tests/test_neighbourhood_cleaning_rule.py 100% <ø> (ø)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3c54ea6...caed659. Read the comment docs.

@glemaitre glemaitre changed the title from [WIP] Reorganise under-sampling methods to [MRG] Reorganise under-sampling methods Mar 29, 2017

@glemaitre

This comment has been minimized.

Member

glemaitre commented Mar 29, 2017

@chkoar Here it comes

@chkoar

This comment has been minimized.

Member

chkoar commented Apr 2, 2017

Could we discard these?

image

The :mod:`imblearn.under_sampling.prototype_generation` submodule
contains the method in which a new samples are generated such that the
dataset become more balanced.
"""

This comment has been minimized.

@chkoar

chkoar Apr 2, 2017

Member

I would write something like that: The :mod:imblearn.under_sampling.prototype_generation submodule
contains methods that generate new samples in order to balance the dataset.

"""
The :mod:`imblearn.under_sampling.prototype_selection` submodule
contains the method in which a subset of the original data a selected
to create a new dataset.

This comment has been minimized.

@chkoar

chkoar Apr 2, 2017

Member

Same here

from . import prototype_generation
from .prototype_generation import ClusterCentroids

from . import prototype_selection

This comment has been minimized.

@chkoar

chkoar Apr 2, 2017

Member

And this one?

This comment has been minimized.

@glemaitre

glemaitre Apr 6, 2017

Member

Yep, it is bringing the file from the each level undernith to under_sampling level

This comment has been minimized.

@chkoar

chkoar Apr 6, 2017

Member

Did you add this in order to be able to perfrom the following import?

from imblearn.under_sampling.prototype_generation import ClusterCentroids

This comment has been minimized.

@glemaitre

glemaitre Apr 6, 2017

Member

no you can import from imblearn.under_sampling import ClusterCentroids

from .edited_nearest_neighbours import RepeatedEditedNearestNeighbours
from .edited_nearest_neighbours import AllKNN
from .instance_hardness_threshold import InstanceHardnessThreshold
from . import prototype_generation

This comment has been minimized.

@chkoar

chkoar Apr 2, 2017

Member

Do we need this line?

This comment has been minimized.

@glemaitre
@glemaitre

This comment has been minimized.

Member

glemaitre commented Apr 6, 2017

Could we discard these?

I kinda like it. I think that it make sense to make it appears in the doc. This is a bit the same with the cluster metrics in scikit-learn. Untilt example and the API and the user guide show you the import, people can get that they are slightly different semantically.

@glemaitre glemaitre force-pushed the glemaitre:is/275 branch from 5068d7d to 63e0cf4 Apr 6, 2017

@glemaitre glemaitre force-pushed the glemaitre:is/275 branch from 63e0cf4 to c34eca6 Apr 6, 2017

@glemaitre

This comment has been minimized.

Member

glemaitre commented Apr 28, 2017

@chkoar are you in favor to merge this one

@chkoar

This comment has been minimized.

Member

chkoar commented Apr 28, 2017

@glemaitre lets merge this

@glemaitre glemaitre merged commit 5b765e3 into scikit-learn-contrib:master Apr 29, 2017

6 checks passed

ci/circleci Your tests passed on CircleCI!
Details
code-quality/landscape Code quality remained the same
Details
codecov/patch 100% of diff hit (target 98.18%)
Details
codecov/project 98.19% (+<.01%) compared to 3c54ea6
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

glemaitre added a commit to glemaitre/imbalanced-learn that referenced this pull request Jun 15, 2017

[MRG] Reorganise under-sampling methods (scikit-learn-contrib#277)
* MAINT change organisation under-sampling

* FIX conflict api doc

* DOC add entry in whats new

* FIX indent in the documentation

* FIX add current module for linking the documentation

* FIX addres christos comments

* ENH Move the tests

* FIX remove useless import

glemaitre added a commit to glemaitre/imbalanced-learn that referenced this pull request Jun 15, 2017

[MRG] Reorganise under-sampling methods (scikit-learn-contrib#277)
* MAINT change organisation under-sampling

* FIX conflict api doc

* DOC add entry in whats new

* FIX indent in the documentation

* FIX add current module for linking the documentation

* FIX addres christos comments

* ENH Move the tests

* FIX remove useless import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment