-
Notifications
You must be signed in to change notification settings - Fork 9
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 string option for metrics #504
base: main
Are you sure you want to change the base?
Conversation
Do you have other examples than the peak ratio, where it would be relevant with additional output? |
I agree that the (unbiased) str is another good example. but yeah not trying to butcher that plot, I think that the idea behind it is still worthy, and there could be more applications that we do not know yet |
But maybe it belongs more generally to the SkillTable than just the skill table next to the scatter plot... ? |
The percentages are relative to the observation mean. I do not care that much for them, but can be useful still.
That is the longer (and better) option, but it will likely require some like an auxiliary metrics class / attribute. I'm not 100% what the solution would look like. If you think this is work pursuing we can look into it. |
fmt = f".{precision}f" | ||
fvalue = f"{rounded_value:{fmt}}" | ||
else: | ||
fvalue = str(value) |
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.
How would this work then, if I have a skill called for instance PR
and the value is 1.17, how would you add the text on the right as you did in your example picture ?
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.
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.
The metric output is
str = f"{pr:.2f} (N={n_joint}"
An idea for 'special metrics':
The concept is that metrics can also produce string outputs. The main purpose for this is to add auxiliary info to the metrics, e.g. for Peak Ratios we often would like to know how many peaks there were:
While not currently used in modelskill itself, but applications using modelskill.
The downside is once the value is set, rounding of numbers would be tricky... But I don't know of any alternative (quick) solution to provide auxiliary metrics without breaking everything.