scoringutils
scoringutils copied to clipboard
Create print method for `scores()` objects
We currently have a scores
object. This could get a nice print method analogously to the ones for forecast objects.
It could for example print the scores that have already been computed.
If we wanted to go there, it could also print any level of summary (resulting from calling summarise_scores()
. This would require something like a by
attribute. @seabbs was previously skeptical about additional attributes and I share his concerns. In this specific instance, the fact that attributes are brittle might not be a big problem. If the by
attribute disappeared it would just mean that the printing is a bit less nice.
Here is a test that we previously had (this comes from a time when a forecast object could have scores, produced by add_coverage()
):
# Check Score columns are printed
expect_output(print(scores_binary), "Score columns")
score_cols <- get_score_names(scores_binary)
expect_output(print(scores_binary), pattern = paste(score_cols, collapse = " "))
I'm pretty on the fence about this.
I'm pretty on the fence about this.
Whether there should be a print method at all? Fair I guess.
I suggest working on the current release first and then we can see in the future depending on user feedback and our own experiences.