Repository navigation
feat: add SEFR linear classifier - #7788
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7788 +/- ##
============================================
+ Coverage 82.52% 82.60% +0.07%
- Complexity 8555 8604 +49
============================================
Files 847 848 +1
Lines 26356 26460 +104
Branches 5152 5181 +29
============================================
+ Hits 21751 21856 +105
Misses 3822 3822
+ Partials 783 782 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hamidkm9
marked this pull request as ready for review
November 29, 2026 15:07
hamidkm9
requested review from
DenizAltunkapan,
alxkm and
yanglbme
as code owners
November 29, 2026 15:07
alxkm
approved these changes
Nov 29, 2026
alxkm
left a comment
Member
There was a problem hiding this comment.
Looks good. Thank you for the contribution.
Contributor
Author
Thank you for the review! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7787.
Adds SEFR to the
machinelearningpackage, as described in the issue. The class hasfit,predictfor one sample or a batch,decisionFunctionandgetWeights. With two labels it learns one weight vector, and with more it goes one-vs-rest.SefrTestchecks the hand-computed example from the issue, that weights stay between -1 and 1, two clusters with arbitrary labels, three classes, a constant feature, and invalid input. Locally the tests, Checkstyle, PMD and SpotBugs all pass, and the files are formatted with clang-format 16.clang-format -i --style=file path/to/your/file.java