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

[MRG] Add the SMOTE-RSB oversampling technique #789

Closed
wants to merge 1 commit into from
Closed

[MRG] Add the SMOTE-RSB oversampling technique #789

wants to merge 1 commit into from

Conversation

zoj613
Copy link

@zoj613 zoj613 commented Feb 4, 2021

Reference Issue

Related to checklist in #105

What does this implement/fix? Explain your changes.

Adds the SMOTE-RSB oversampling technique.

Any other comments?

NA

@pep8speaks
Copy link

pep8speaks commented Feb 4, 2021

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

Line 609:17: W503 line break before binary operator
Line 857:89: E501 line too long (91 > 88 characters)
Line 1467:46: W504 line break after binary operator

Comment last updated at 2021-02-05 00:10:14 UTC

@zoj613 zoj613 mentioned this pull request Feb 4, 2021
19 tasks
@zoj613
Copy link
Author

zoj613 commented Feb 4, 2021

Not sure why there so many build failures. The tests pass locally.

@zoj613 zoj613 changed the title [WIP] Add the SMOTE-RSB oversampling technique [MRG] Add the SMOTE-RSB oversampling technique Feb 5, 2021
@zoj613
Copy link
Author

zoj613 commented Feb 5, 2021

Ping @glemaitre @hayesall @chkoar . I think this is good for a review.

@zoj613
Copy link
Author

zoj613 commented Feb 16, 2021

ping @glemaitre

@glemaitre
Copy link
Member

@zoj613 I think that we should prioritize which SMOTE variants to include in imbalanced-learn. I think that the benchmark done there https://github.com/analyticalmindsltd/smote_variants/ is quite interesting.

I would be more in favor on implementing the 6 versions mentioned in the comment: analyticalmindsltd/smote_variants#14 (comment)

I need to update the issue in this regard.

raise TypeError("`similarity_func` must be a callable")

# VERY slow! cython might be better suited for this function
def _make_similarity_matrix(self, X_s, X_m, maxmin_diff):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I look quickly at the paper. It seems that the similarity is used to find some neighbours.
I am not entirely sure but a NearestNeighbors with a given radius (i.e. the similarity-value (distance normalized by the max distance) would be a way to get a faster implementation. Managing categorical and numerical value would be to implement different distance (e.g. preocmputed ValueDifferenceMetric as in SMOTEN.

@zoj613 zoj613 closed this Mar 10, 2021
@zoj613 zoj613 deleted the smote-rsb branch March 10, 2021 15:42
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