-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[MRG+1] idx_under should be expressed by indices of parameter X #220
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
Conversation
# If we need to offer support for the indices | ||
if self.return_indices: | ||
idx_under = np.flatnonzero(y == self.min_c_) | ||
idx_maj = np.flatnonzero(y == self.maj_c_) |
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.
This will make the algorithm failed in the case of multiclass.
idx_maj
needs to be defined for each class in the for
loop.
Subsequently, the rest of the algorithm needs to take it into account.
@osanai-hisashi We want to keep the OSS to tackle the multiclass problem. So the solution still need some work to be compliant, but there is a bug in the index as you mentioned. |
With current implementation idx_under is concatenated with idx_under, idx_maj_sample and idx_tmp. And idx_maj_sample is created with indices of majority class so wrong indices will be created. This patch fixes the way of creating idx_under.
39c3424
to
7e26011
Compare
thanks for the review. I will move L185 into the for loop with a condition change (y == key). |
LGTM @chkoar can you make the MRG+1 just to be sure |
…-contrib#220) With current implementation idx_under is concatenated with idx_under, idx_maj_sample and idx_tmp. And idx_maj_sample is created with indices of majority class so wrong indices will be created. This patch fixes the way of creating idx_under.
…-contrib#220) With current implementation idx_under is concatenated with idx_under, idx_maj_sample and idx_tmp. And idx_maj_sample is created with indices of majority class so wrong indices will be created. This patch fixes the way of creating idx_under.
…-contrib#220) With current implementation idx_under is concatenated with idx_under, idx_maj_sample and idx_tmp. And idx_maj_sample is created with indices of majority class so wrong indices will be created. This patch fixes the way of creating idx_under.
Reference Issue
What does this implement/fix? Explain your changes.
With current implementation idx_under is concatenated with idx_under,
idx_maj_sample and idx_tmp. And idx_maj_sample is created with
indices of majority class so wrong indices will be created.
This patch fixes the way of creating idx_under.
Any other comments?