Skip to content
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 COE, COP, and volumetric efficiency to metrics #195

Merged
merged 29 commits into from
Jun 2, 2022

Conversation

jarq6c
Copy link
Collaborator

@jarq6c jarq6c commented Jun 1, 2022

This PR implements a generic mean_error_skill_score method and adds three new metrics: coefficient_of_persistence, coefficient_of_extrapolation, and volumetric_efficiency. These three metrics are computed in a fashion similar to the Nash-Sutcliffe Model Efficiency, except instead of using the mean baseline they use a persistence, an extrapolation, and zero baseline. A "persistence" baseline uses the observed value given a lag. An extrapolation baseline uses the last two observed values to extrapolate a linear approximation.

Added @hellkite500 and @aaraney may be interested.

Additions

  • mean_error
  • mean_squared_error
  • root_mean_squared_error
  • mean_error_skill_score
  • coefficient_of_persistence
  • coefficient_of_extrapolation
  • volumetric_efficiency

Removals

  • None

Changes

  • nash_sutcliffe_efficiency is now based on the generic mean_error_skill_score
  • Options were added to change the power/exponent of the nash_sutcliffe_efficiency
  • Expanded docstrings with more helpful descriptions of metrics

Testing

  1. Passed existing tests with updates.
  2. New methods tested.

Notes

Todos

  • None

Checklist

  • PR has an informative and human-readable title
  • PR is well outlined and documented. See #12 for an example
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (see CONTRIBUTING.md)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output) using numpy docstring formatting
  • Placeholder code is flagged / future todos are captured in comments
  • Reviewers requested with the Reviewers tool ➡️

@jarq6c jarq6c added the enhancement New feature or request label Jun 1, 2022
@jarq6c jarq6c requested a review from christophertubbs June 1, 2022 13:55
@jarq6c jarq6c self-assigned this Jun 1, 2022
Copy link

@christophertubbs christophertubbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only 'problems' I found were stylistic preferences, which is purely subjective.

I would like to eventually see quick documentation on what the metrics actually measure, instead of just directions to the papers, but that's just because I'm not a scientific user.

@jarq6c jarq6c changed the title Add COE and COP to metrics Add COE, COP, and volumetric efficiency to metrics Jun 1, 2022
@jarq6c
Copy link
Collaborator Author

jarq6c commented Jun 1, 2022

The only 'problems' I found were stylistic preferences, which is purely subjective.

I would like to eventually see quick documentation on what the metrics actually measure, instead of just directions to the papers, but that's just because I'm not a scientific user.

Thanks for the feedback! I decided to significantly expand the descriptions of all the metrics. Hopefully these new descriptions will help users unfamiliar with some of these.

@jarq6c jarq6c merged commit d0e7b39 into NOAA-OWP:main Jun 2, 2022
@jarq6c
Copy link
Collaborator Author

jarq6c commented Jun 2, 2022

@jarq6c jarq6c deleted the met-skill branch June 2, 2022 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hydrotools.metrics Add coefficient of persistence and coefficient of extrapolation
2 participants