Skip to content

FIX handle properly null weights in SVC#27763

Draft
glemaitre wants to merge 5 commits intoscikit-learn:mainfrom
glemaitre:bug_svm_zero_weights
Draft

FIX handle properly null weights in SVC#27763
glemaitre wants to merge 5 commits intoscikit-learn:mainfrom
glemaitre:bug_svm_zero_weights

Conversation

@glemaitre
Copy link
Copy Markdown
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

free(count);
}

if(svm_type == C_SVC ||
Copy link
Copy Markdown
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.

@github-actions
Copy link
Copy Markdown

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

Development

Successfully merging this pull request may close these issues.

SVC and OneClassSVM fails to fit or have wrong fitted attributes with null sample weights Dense svm and zeroed weight for samples of entire class

2 participants