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 33 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.
small note - long-term it might be a bit more elegant to implement
transform_pmf_model()
as an S3 method. Then we could omit theswitch
and just calltransform_model_out(model_out_tbl, target_observations)
(don't think it makes much sense to do that now though)
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.
At minimum, this
switch
will be refactored into atransform_model_out
function per issue #11.Currently, the hubverse tooling does not have separate S3 classes per output type; mostly, our tools accept data frames containing a mix of output types. But it could be worth thinking about whether there are other places (e.g. plotting?) where functionality is specific to the output type and having this kind of class structure would be helpful.
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.
we'll be changing this in
scoringutils
by replacing functions likemetrics_quantile()
,metrics_point()
etc. with a singleget_metrics()
function that is an S3 generic. So if you calledget_metrics(forecast_quantile_object)
you'd get the quantile metrics. This would simplify this code because one could transform the forecasts into a forecast object first and then rely on S3 to get the correct metrics.