-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[FIX] ScoringSheetViewer computing target class values from base values #7025
base: master
Are you sure you want to change the base?
[FIX] ScoringSheetViewer computing target class values from base values #7025
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7025 +/- ##
==========================================
+ Coverage 88.36% 88.62% +0.25%
==========================================
Files 332 332
Lines 73345 73381 +36
==========================================
+ Hits 64813 65034 +221
+ Misses 8532 8347 -185 |
… sort attributes by importance
f79ef51
to
67f6d2d
Compare
@@ -510,15 +515,32 @@ def _extract_data_from_model(self, classifier): | |||
all_risks = 1 / (1 + np.exp(-all_scaled_scores)) | |||
|
|||
self.attributes = attributes | |||
self._base_coefficients = coefficients | |||
self._base_all_scores = all_scores.tolist() | |||
self._base_all_risks = (all_risks * 100).tolist() | |||
self.coefficients = coefficients |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these three lines still necessary? These attributes are set in self._adjust_for_target_class
, which is called a few lines later.
Sorts the attributes in descending order of importance (absolute coefficient value) | ||
by combining the attributes and coefficients into tuples and sorting them. | ||
""" | ||
combined = list( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to call list
here. You can pass a zip
object to sorted
; sorted
will work on any iterable.
Issue
Fixes #6996
Description of changes
Includes