Skip to content

Conversation

@nikosbosse
Copy link
Collaborator

@nikosbosse nikosbosse commented Nov 24, 2023

Fixes #500

Currently, bias_quantile() uses an internal helper function, bias_quantile_single_vector() to compute bias for a single forecast.

This helper functions throws a message if the median is not part of the quantile levels provided. That means that a single call to bias_quantile() can produce a lot of messages, as the message is repeated every time the helper is called.
This PR

  • moves the message from the helper function to bias_quantile(), thus only getting one message for a single call to bias_quantile().
  • adds a test for this

This is related to #418 (and only addresses a small part of the larger problem), but is in my opinion definitely an improvement over what we currently have.

@codecov
Copy link

codecov bot commented Nov 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b778f8a) 81.21% compared to head (5f182da) 81.22%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #501      +/-   ##
===========================================
+ Coverage    81.21%   81.22%   +0.01%     
===========================================
  Files           20       20              
  Lines         1725     1726       +1     
===========================================
+ Hits          1401     1402       +1     
  Misses         324      324              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@seabbs seabbs left a comment

Choose a reason for hiding this comment

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

Good idea. Looks good.

@nikosbosse nikosbosse merged commit accb868 into develop Nov 28, 2023
@nikosbosse nikosbosse deleted the improve-bias-quantile branch November 28, 2023 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants