-
-
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
[ENH] Test and Score: Allow choosing columns #2257
Conversation
788e862
to
87d7037
Compare
Codecov Report
@@ Coverage Diff @@
## master #2257 +/- ##
=========================================
Coverage ? 72.51%
=========================================
Files ? 319
Lines ? 55198
Branches ? 0
=========================================
Hits ? 40025
Misses ? 15173
Partials ? 0 |
I like this. It's a good solution to the 'kitchen sink' problem.
It is not related to this PR, I get it on the latest master as well, but it seems to be happening in Test&Score and perhaps it can be patched here. Or in another PR... Oh, and it doesn't break anything obvious. |
8221cc7
to
b2f85a8
Compare
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.
Looks good to me
def show_column_chooser(self, pos): | ||
# pylint doesn't know that self.shown_scores is a set, not a Setting | ||
# pylint: disable=unsupported-membership-test | ||
def update(col_name, state): |
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.
state -> visible?
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.
Perhaps misleading since it would imply it is (was) already visible. I changed it to checked
.
return action | ||
|
||
def execmenu(*_): | ||
self.assertEqual(list(actions), list(all)[1:]) |
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.
A comment explaining why complication with execmenu is needed would be nice
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.
Fixed.
@@ -170,6 +170,10 @@ class OWTestLearners(OWWidget): | |||
TARGET_AVERAGE = "(Average over classes)" | |||
class_selection = settings.ContextSetting(TARGET_AVERAGE) | |||
|
|||
shown_scores = \ | |||
settings.Setting({"AUC", "CA", "F1", "Precision", "Recall", |
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.
Non-primitive settings cannot be stored to workflow in json format resulting in base64 encoded pickled blobs. Not sure if we care, since the widget uses context settings, which also cannot be serialized with json.
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.
If list can be stored in json and if we care(d) I can replace the set with a list. No big changes in the code, except that conceptually this is a set, not a list.
Can it, do we, should I?
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.
yes, probably not, no
If this change would "break" json serialization, I would say yes, but since it is already broken, I would say leave it like it is.
b2f85a8
to
3212e3a
Compare
We may want to add more scorers in the future, but we'd like to keep the widget simple. This PR allows the user to choose the columns by right-clicking in the top header.
Includes