Calculate the correlation between different metrics for a data.frame of
scores as produced by score()
.
Arguments
- scores
A data.table of scores as produced by
score()
.- metrics
A character vector with the metrics to show. If set to
NULL
(default), all metrics present inscores
will be shown
Examples
scores <- score(example_quantile)
#> The following messages were produced when checking inputs:
#> 1. 144 values for `prediction` are NA in the data provided and the corresponding rows were removed. This may indicate a problem if unexpected.
correlation(scores)
#> Warning: There is a column called 'quantile' in the scores. Usually, you should call 'summarise_scores()' to summarise over quantiles and obtain one score per forecast before calculating correlations. You can ignore this warning if you know what you're doing.
#> interval_score dispersion underprediction overprediction coverage
#> 1: 1.00 0.41 0.31 0.93 -0.23
#> 2: 0.41 1.00 0.10 0.27 -0.05
#> 3: 0.31 0.10 1.00 -0.03 -0.23
#> 4: 0.93 0.27 -0.03 1.00 -0.16
#> 5: -0.23 -0.05 -0.23 -0.16 1.00
#> 6: -0.23 -0.08 -0.20 -0.17 0.78
#> 7: 0.10 0.10 -0.32 0.21 0.03
#> 8: 0.97 0.47 0.30 0.89 -0.21
#> coverage_deviation bias ae_median metric
#> 1: -0.23 0.10 0.97 interval_score
#> 2: -0.08 0.10 0.47 dispersion
#> 3: -0.20 -0.32 0.30 underprediction
#> 4: -0.17 0.21 0.89 overprediction
#> 5: 0.78 0.03 -0.21 coverage
#> 6: 1.00 0.04 -0.26 coverage_deviation
#> 7: 0.04 1.00 0.10 bias
#> 8: -0.26 0.10 1.00 ae_median