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

ENH Add sample_indices for SMOTE class #843

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tianlinhe
Copy link

Reference issue #772

What does this implement/fix? Explain your changes.

To add the sample indices of the generating samples that do not belong to the original dataset.

  • sample_indices() exposes the index of the original samples in a list
  • arg get_which_neighbors=True reveals from which random neighbor the sample was generated. For original data it returns 0, which means itself

Any other comments?

-[x] Changes pass PEP8 (no issue on the changed lines)

It is only implemented in SMOTE. If needed I am happy to include it in ADASYN.

@pep8speaks
Copy link

Hello @tianlinhe! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 303:35: E226 missing whitespace around arithmetic operator
Line 330:1: W293 blank line contains whitespace

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.

None yet

2 participants