Merged
Conversation
modelskill/metrics.py
Outdated
|
|
||
|
|
||
| def metric(best: str | None = None, has_units: bool = False): | ||
| """Decorator to attach a 'best' attribute to metric functions.""" |
Member
There was a problem hiding this comment.
update docstring with all 3 functionality
Member
|
I wonder if we could use the same decorator concept to handle the aliasing concept in metrics 🤔 right now it is confusing that we have e.g. mae and mean_absolute_error which is the same thing. In a list of available metrics they should not appear as two separate entries and I guess in practice one would never user mean_absolute_error as it would be clumsy in a table. Maybe we could instead have a long_name attribute on mae or display_name on the long one or something. I guess it would be better to postpone this to a future PR though... |
Member
Author
|
TODO:
_one_is_best_metrics = ["lin_slope"]
_zero_is_best_metrics = ["bias"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.