-
-
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] Silhouette Plot: now setting axis range properly #2377
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2377 +/- ##
=========================================
Coverage ? 74.33%
=========================================
Files ? 320
Lines ? 55828
Branches ? 0
=========================================
Hits ? 41497
Misses ? 14331
Partials ? 0 |
@@ -574,11 +574,11 @@ def clear(self): | |||
|
|||
def __setup(self): | |||
# Setup the subwidgets/groups/layout | |||
smax = max((numpy.max(g.scores) for g in self.__groups | |||
smax = max((numpy.max(numpy.nan_to_num(g.scores)) for g in self.__groups |
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.
Why not numpy.nanmax
(here) and numpy.nanmin
(below)? Plus, set it to 1 or -1 if the length is zero or all values are NaN.
Is this still WIP, as the title suggests, or can we merge it? As a sidenote, the snapshot again provides no information (except that the bug can be reproduced by connecting Silhouette to File), so one has to check the code to see what the PR is about. No need to fix this here, but please provide meaningful descriptions in the future. |
You can add |
Ok, fixed. |
@@ -1,3 +1,4 @@ | |||
# pylint disable=protected-access |
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.
Sorry for my typeo: this has no effect due to a missing a colon after pylint (see below). You can also add a comment # Test methods are allowed to access private members
above.
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.
Well, my mistake, I should have known by now that there is a colon after # pylint
.
Issue
Handling
nan
values.https://sentry.io/biolab/orange3/issues/220334718/
Description of changes
Includes