Preserve numeric labels when adapting single-class classifiers - #680
Open
Linxiushen wants to merge 1 commit into
Open
Linxiushen wants to merge 1 commit into
Linxiushen wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #680 +/- ##
===========================================
- Coverage 67.21% 22.78% -44.44%
===========================================
Files 77 77
Lines 11735 11735
===========================================
- Hits 7888 2674 -5214
- Misses 3847 9061 +5214 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
The single-class adapter adds a synthetic string class using NumPy's inferred dtype. For integer or boolean classes, this also converts the original label to a string.
PR(model).explain_perf(X, y)andROC(model).explain_perf(X, y)then raiseKeyErrorwhile looking up the original labels; explanation records can instead mark the observed class as unknown with probability zero.Preserve the original label in an object array alongside the synthetic class. The regression tests fit real sklearn classifiers and cover public PR/ROC calls, explanation label/probability mapping, single-sample inputs, strings, and the ordinary binary path.
Validation on Windows / Python 3.12:
Single-class ROC metrics remain undefined as reported by sklearn. Full EBM/native and browser suites were not run.
Hosted CI follow-up: all 21 new regression cases pass in both failed Python jobs. Their APLR MRO errors also occur in a scheduled run on the same unchanged base; Powerlift's SQLAlchemy 2.1.1 / sqlalchemy-utils 0.42.1 import failure likewise reproduces there. Docs additionally fails when the fork token tries to create its warning check (403). The workflow has 30 successful, 4 failed and 31 cancelled jobs, so the full matrix remains incomplete. DCO is a separate owner-attestation gate. Same-base comparison run.