get_correlations: Calculate correlation between metrics

View source: R/correlations.R

get_correlationsR Documentation

Calculate correlation between metrics

Description

Calculate the correlation between different metrics for a data.frame of scores as produced by score().

Usage

get_correlations(scores, metrics = get_metrics(scores), digits = NULL, ...)

Arguments

scores

An object of class scores (a data.table with scores and an additional attribute metrics as produced by score()).

metrics

A character vector with the metrics to show. If set to NULL (default), all metrics present in scores will be shown.

digits

A number indicating how many decimal places the result should be rounded to. By default (digits = NULL) no rounding takes place.

...

Additional arguments to pass down to cor().

Value

An object of class scores (a data.table with an additional attribute metrics holding the names of the scores) with correlations between different metrics

Examples

scores <- score(as_forecast(example_quantile))
get_correlations(scores, digits = 2)

epiforecasts/scoringutils documentation built on April 23, 2024, 4:56 p.m.