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
TST Add common tests for single class fitting induced by sample weights #24140
TST Add common tests for single class fitting induced by sample weights #24140
Conversation
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.
Thanks for the PR!
I am using precommit and |
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.
Given the +1 or @jnothman on the original PR, my approval, and @thomasjpfan review, I think that this PR is good to be merged.
@@ -3167,7 +3167,7 @@ const char *PREFIX(check_parameter)(const PREFIX(problem) *prob, const svm_param | |||
free(newprob.x); | |||
free(newprob.y); | |||
free(newprob.W); | |||
return "Invalid input - all samples with positive weights have the same label."; | |||
return "Invalid input - all samples with positive weights belong to the same class."; |
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.
For other reviewers: This is the only change in the file. I know that we usually don't do cosmetic change but here we remove all trailingspace once for all. I don't want to revert them.
Going to merge when the CIs turn green |
…ts (scikit-learn#24140) Co-authored-by: johayon <johayon.math@gmail.com> Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
…ts (scikit-learn#24140) Co-authored-by: johayon <johayon.math@gmail.com> Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
…ts (scikit-learn#24140) Co-authored-by: johayon <johayon.math@gmail.com> Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
…ts (scikit-learn#24140) Co-authored-by: johayon <johayon.math@gmail.com> Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
…ts (#24140) Co-authored-by: johayon <johayon.math@gmail.com> Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Reference Issues/PRs
Fixes #10337.
Supersedes and closes #10347.
What does this implement/fix? Explain your changes.
This pull request adds common tests for classifiers reducing to less than two classes via sample weights during fit.
See this comment in #10337
Any other comments?
In the meanwhile SVM was modified by #14286.
The error message has been updated to make the new common tests pass.
#10347 already received one approval by @jnothman.