Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #697 +/- ##
==========================================
+ Coverage 67.80% 68.08% +0.28%
==========================================
Files 77 77
Lines 11893 11898 +5
==========================================
+ Hits 8064 8101 +37
+ Misses 3829 3797 -32 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:
|
Signed-off-by: AryanRG <aryanrganjoo@gmail.com>
AryanRG
force-pushed
the
fix-class-histogram-labels
branch
from
October 23, 2026 05:33
8779f3c to
90e8cda
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Large integer labels still lose precision in browser-rendered overall histograms and collapse into the same category.
What changed in this PR
This PR updates ClassHistogram target handling to preserve distinct string labels and exact integer values while retaining numeric float grouping and ordering.
Changes:
- Avoids float conversion for integer and string targets.
- Adds regression tests for label preservation, class counts, unsigned integers, and float semantics across multiple input containers.
| File | Description |
|---|---|
python/interpret-core/tests/data/test_class_histogram.py |
Adds label-preservation and histogram regression tests. |
python/interpret-core/interpret/data/_response.py |
Selects target conversion based on label types. |
Review effort: Balanced
Signed-off-by: AryanRG <aryanrganjoo@gmail.com>
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.

ClassHistogramtries to cast all targets to float before computing class counts. This merges numeric-looking string labels such as"01"and"1", and loses precision for large integer labels.Preserve string class names and integer values while retaining numeric float grouping, including signed zero and numeric ordering. Serialize integer chart labels as strings after numeric sorting. Added regression tests for these cases and unsigned labels.
Histogram and adjacent visualization tests and formatting pass. Existing lint and type-check diagnostics are unchanged.