Skip to content

FIX handle properly null weights in SVC #27763

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

glemaitre
Copy link
Member

@glemaitre glemaitre commented Nov 10, 2023

closes #5150
closes #25380

This changes intends to:

  • fix the indexing of the support vector support_ since negative and zeros samples are removed
  • fix the value reported by n_support_
  • fix the dual coefficient when the removing sample via sample weights are cancelling an entire class
  • bonus trying to make the code more readable by removing single letter variable

@@ -3134,47 +3176,41 @@ const char *PREFIX(check_parameter)(const PREFIX(problem) *prob, const svm_param
free(count);
}

if(svm_type == C_SVC ||
Copy link
Member Author

Choose a reason for hiding this comment

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

This check should be done for all estimators.

Copy link

github-actions bot commented Nov 10, 2023

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: bacf4d7. Link to the linter CI: here

@glemaitre glemaitre marked this pull request as draft November 10, 2023 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant