Plot overall validation metrics by adjustment method
Source:R/plot_validation.R
plot_validation_metrics.RdBuilds a method-by-metric matrix from validate_flow_overall() results or a
data frame containing one row per method. Cell fill is scaled within each
metric so unlike metrics are not forced onto a common raw scale, while cell
labels show the original metric values.
Usage
plot_validation_metrics(
metrics,
error_measures = c("mae", "rmse", "mape"),
metric_cols = NULL,
comparisons = "adjusted_vs_benchmark",
methods = NULL,
method_col = "method",
method_family_col = NULL,
method_labels = NULL,
palette = NULL,
relative_error_breaks = seq(0, 100, by = 10)
)
plot_validate_flow_metrics(...)Arguments
- metrics
A data frame, one
validate_flow_overall()result, or a named list ofvalidate_flow_overall()results.- error_measures
Character vector of error measure IDs or labels to plot. Defaults to
c("mae", "rmse", "mape"). Common labels such as"MAE","RMSE","MAPE", and"Mean absolute error"are accepted.- metric_cols
Compatibility alias for
error_measures.- comparisons
Flow comparison(s) to plot. Defaults to
"adjusted_vs_benchmark". Use"all"whenmetricscontains rows for all supported comparisons. When"raw_vs_benchmark"is included, it is shown as a single unadjusted raw MPD baseline row.- methods
Optional character vector of method identifiers or display labels to include. Default
NULLincludes all methods.- method_col
Column containing the method identifier. Default
"method".- method_family_col
Optional column containing method-family labels. Retained for compatibility with earlier prototypes; the metric matrix is organised by method and metric.
- method_labels
Optional named character vector used to relabel methods.
- palette
Optional character vector of colours for the relative-error fill scale. Defaults to a yellow-green-blue sequence suitable for ordered error intensity.
- relative_error_breaks
Numeric percentage cut points used to bin the within-metric relative-error fill scale. Default
seq(0, 100, by = 10)produces legend ranges such as 0-10, 11-20, and 91-100.