-
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] Add the SMOTE-RSB oversampling technique #789
Conversation
Hello @zoj613! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2021-02-05 00:10:14 UTC |
Not sure why there so many build failures. The tests pass locally. |
Ping @glemaitre @hayesall @chkoar . I think this is good for a review. |
ping @glemaitre |
@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): |
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 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
.
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