-
Notifications
You must be signed in to change notification settings - Fork 54
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
add a metric print method #455
Conversation
As a general comment, i think we should overhaul the printing of |
Nice! Related to #454, then. How would you like to move this PR forward/not? I'd be glad to work on the metric set method, too. I guess a one-line-output metric print method would make the metric set print method nice and consistent. :) |
I think we should add the metric set printing to this PR. we might learn things when updating that, that informs the individual printing method, so keeping them together seems easier |
I'm thinking this could look like: roc_auc
#> A probability metric | direction: maximize
demographic_parity(boop)
#> A class metric | direction: minimize, group-wise on: boop ...with: metric_set(roc_auc, demographic_parity(boop))
#> A metric set, consisting of:
#> - A probability metric | direction: maximize
#> - A class metric | direction: minimize, group-wise on: boop ...with cli formatting where needed. Notably, I think it'd be great to link Thoughts? |
I like the look of that! I would like to have the names of the metrics in the metric set printing. |
Spent some time on this yesterday but didn't quite have time to finish—moving on to other things for at least today. Still need to write code for justification (see |
Currently, output looks like: library(yardstick)
dem_parity_boop <- demographic_parity(boop)
roc_auc
#> A probability metric | direction: maximize
dem_parity_boop
#> A class metric | direction: minimize, group-wise on: boop
demographic_parity(boop)
#> A class metric | direction: minimize, group-wise on: boop
metric_set(roc_auc, dem_parity_boop)
#> A metric set, consisting of:
#> - `roc_auc()`, a probability metric | direction: maximize
#> - `dem_parity_boop()`, a class metric | direction: minimize, group-wise on:
#> boop
metric_set(roc_auc, demographic_parity(boop))
#> A metric set, consisting of:
#> - `roc_auc()`, a probability metric | direction: maximize
#> - `demographic_parity(boop)()`, a class metric | direction: minimize,
#> group-wise on: boop Created on 2023-11-27 with reprex v2.0.2 While |
This all looks good! added a couple of small changes, will merge when CI runs clean |
This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue. |
Closes #435!