plot_heatmap: Create a Heatmap of a Scoring Metric

View source: R/plot.R

plot_heatmapR Documentation

Create a Heatmap of a Scoring Metric

Description

This function can be used to create a heatmap of one metric across different groups, e.g. the interval score obtained by several forecasting models in different locations.

Usage

plot_heatmap(scores, y = "model", x, metric)

Arguments

scores

A data.frame of scores based on quantile forecasts as produced by score().

y

The variable from the scores you want to show on the y-Axis. The default for this is "model"

x

The variable from the scores you want to show on the x-Axis. This could be something like "horizon", or "location"

metric

the metric that determines the value and colour shown in the tiles of the heatmap

Value

A ggplot2 object showing a heatmap of the desired metric

Examples

scores <- score(example_quantile)
scores <- summarise_scores(scores, by = c("model", "target_type", "range"))

plot_heatmap(scores, x = "target_type", metric = "bias")

scoringutils documentation built on Feb. 16, 2023, 7:30 p.m.