plot_score_table | R Documentation |
Plots a coloured table of summarised scores obtained using
score()
.
plot_score_table(scores, y = "model", by = NULL, metrics = NULL)
scores |
A data.table of scores as produced by |
y |
the variable to be shown on the y-axis. Instead of a single character string,
you can also specify a vector with column names, e.g.
|
by |
A character vector that determines how the colour shading for the
plot gets computed. By default ( |
metrics |
A character vector with the metrics to show. If set to
|
A ggplot2 object with a coloured table of summarised scores
library(ggplot2) library(magrittr) # pipe operator data.table::setDTthreads(1) # only needed to avoid issues on CRAN scores <- score(example_quantile) %>% summarise_scores(by = c("model", "target_type")) %>% summarise_scores(fun = signif, digits = 2) plot_score_table(scores, y = "model", by = "target_type") + facet_wrap(~target_type, ncol = 1) # can also put target description on the y-axis plot_score_table(scores, y = c("model", "target_type"), by = "target_type")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.