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

Add option to return indices in RandomOverSampler #439

Merged
merged 4 commits into from Aug 22, 2018

Conversation

Projects
None yet
3 participants
@hgascon
Contributor

hgascon commented Jul 25, 2018

As in RandomUnderSampler, this commit adds the option to return the indices used for over sampling in the corresponding classes. This can be useful, for example, if the same sampling is to be used again in a different data structure with the original shape and class distribution.

Add option to return indices in RandomOverSampler
As in RandomUnderSampler, this commit adds the option to return the indices used for over sampling in the corresponding classes. This can be useful, for example, if the same sampling is to be used again in a different data structure with the original shape and class distribution.
@pep8speaks

This comment has been minimized.

pep8speaks commented Jul 25, 2018

Hello @hgascon! Thanks for updating the PR.

Cheers ! There are no PEP8 issues in this Pull Request. 🍻

Comment last updated on August 22, 2018 at 20:31 Hours UTC
@codecov

This comment has been minimized.

codecov bot commented Jul 25, 2018

Codecov Report

Merging #439 into master will decrease coverage by 0.08%.
The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #439      +/-   ##
==========================================
- Coverage   98.77%   98.68%   -0.09%     
==========================================
  Files          75       70       -5     
  Lines        4410     4191     -219     
==========================================
- Hits         4356     4136     -220     
- Misses         54       55       +1
Impacted Files Coverage Δ
imblearn/over_sampling/random_over_sampler.py 95.83% <80%> (-4.17%) ⬇️
imblearn/over_sampling/smote.py 91.82% <0%> (-2.44%) ⬇️
imblearn/utils/estimator_checks.py 96.69% <0%> (-0.04%) ⬇️
imblearn/over_sampling/__init__.py 100% <0%> (ø) ⬆️
imblearn/over_sampling/tests/test_smote.py 100% <0%> (ø) ⬆️
imblearn/keras/_generator.py
imblearn/tensorflow/_generator.py
imblearn/tensorflow/__init__.py
imblearn/keras/tests/test_generator.py
imblearn/keras/__init__.py

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 7c48491...6244ccf. Read the comment docs.

@glemaitre

This comment has been minimized.

Member

glemaitre commented Jul 25, 2018

Could you add an additional test to have full coverage. You should check the output of the samples indices returned.

Please add an entry to the change log at doc/whats_new/v0.**.rst under enhancement. Like the other entries there, please reference this pull request with :issue: and credit yourself (and other contributors if applicable) with :user:

@glemaitre glemaitre merged commit aa7fbdd into scikit-learn-contrib:master Aug 22, 2018

1 of 3 checks passed

LGTM analysis: Python Running analyses for revisions
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@glemaitre

This comment has been minimized.

Member

glemaitre commented Aug 22, 2018

I finished up the PR. Thanks @hgascon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment