Creates a publication-quality plot of objective function values across iterations, showing mean, min, max, and individual realisation traces.
Usage
plot_phi(
result,
log_scale = TRUE,
show_reals = FALSE,
title = "Objective Function Convergence"
)Examples
phi_dt <- data.table::data.table(
iteration = 0:4,
total_runs = c(50L, 100L, 150L, 200L, 250L),
mean = c(1200, 450, 180, 95, 72),
min = c(900, 320, 130, 70, 55),
max = c(1700, 680, 260, 140, 105),
median = c(1180, 440, 175, 92, 70),
std = c(180, 80, 35, 18, 12)
)
p <- plot_phi(phi_dt, log_scale = TRUE,
title = "Synthetic Phi Convergence")
inherits(p, "ggplot")
#> [1] TRUE