scoringutils icon indicating copy to clipboard operation
scoringutils copied to clipboard

Create print method for `scores()` objects

Open nikosbosse opened this issue 11 months ago • 2 comments

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 = " "))

nikosbosse avatar Feb 29 '24 02:02 nikosbosse

I'm pretty on the fence about this.

seabbs avatar Feb 29 '24 14:02 seabbs

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.

nikosbosse avatar Feb 29 '24 15:02 nikosbosse