
Plot Error Ratio Evolution for a discourse.object
Source:R/fct_plot_error_ratio.R
plot_error_ratio.Rd
Displays how the ratio of correlation to regression error evolves across iterations for a `discourse.object`, enabling assessment of balance between objectives.
Usage
plot_error_ratio(
discourse_obj,
run = 1,
show_mean = TRUE,
show_median = TRUE,
show_final = TRUE
)
Arguments
- discourse_obj
A `discourse.object` S3 object produced by `optim_*` functions, containing a `track_error` element (numeric vector or list of vectors).
- run
Integer. Index of the run to plot when `track_error` is a list; default `1`.
- show_mean
Logical. If `TRUE`, draws a horizontal line at the mean error ratio; default `TRUE`.
- show_median
Logical. If `TRUE`, draws a horizontal line at the median error ratio; default `TRUE`.
- show_final
Logical. If `TRUE`, draws a horizontal line at the final iteration's error ratio; default `TRUE`.
Examples
if (FALSE) { # \dontrun{
result <- optim_lm(args = ..., ...)
plot_error(result, run = 1)
} # }