Skip to content
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

hgascon
Copy link
Contributor

@hgascon 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.

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
Copy link

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
Copy link

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
Copy link
Member

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
@glemaitre
Copy link
Member

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants