-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Conversation
@chkoar Here it comes |
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. | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
imblearn/under_sampling/__init__.py
Outdated
from . import prototype_generation | ||
from .prototype_generation import ClusterCentroids | ||
|
||
from . import prototype_selection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it is bringing the file from the each level undernith to under_sampling level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you add this in order to be able to perfrom the following import?
from imblearn.under_sampling.prototype_generation import ClusterCentroids
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no you can import from imblearn.under_sampling import ClusterCentroids
imblearn/under_sampling/__init__.py
Outdated
from .edited_nearest_neighbours import RepeatedEditedNearestNeighbours | ||
from .edited_nearest_neighbours import AllKNN | ||
from .instance_hardness_threshold import InstanceHardnessThreshold | ||
from . import prototype_generation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep
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. |
@chkoar are you in favor to merge this one |
@glemaitre lets merge this |
* 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
* 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
Reference Issue
Fixes #275
What does this implement/fix? Explain your changes.
Any other comments?