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.
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
Score model out #46
Score model out #46
Changes from 8 commits
1f51495
08d0edd
e101808
d438a7a
448e830
b92891a
d6a6b36
c38d738
28724e4
41c8c50
fd06ad7
fa64a8e
7e3ce73
5b8eb40
a68fabb
a6a9c3b
7c8e86d
47f29a2
fed85ac
4c6eabc
6c443e6
778be41
f27b164
2367518
2c740d7
79a4828
6e09adc
5d45a2a
ba70640
7df1803
a9c2795
18ea11a
285b4d9
587c922
78f7295
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This simplifies the logic a bit and gives logical indicator variables that will make it easier to debug.
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.
I had considered something like this, but I implemented the original logic because the exact string
"interval_coverage_XY"
is not actually a valid metric. This is sort of a clumsy indication to the package user that they can ask for any 2-digit interval coverage level, like"interval_coverage_80"
. So my idea was to add"interval_coverage_XY"
to the list of valid metrics that's shown to the user in an error message (with an explanation of what we mean), but to not include that in the list ofvalid_metrics
.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.
This is repeated three times. It could be a separate validation function, which would improve readability and maintainability of the error.
Note I've included a
comment
argument to accommodate notes as for the case in quantiles and I've formatted the output a bit better so that the invalid metric stands out from the other options.With this, each of the different
else if
statements could be written as: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.
I've implemented a variation on this suggestion in 5d45a2a. I felt it was more straightforward to keep the calculation of which metrics were invalid outside of this function, so the function itself just issues the error message.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.