Visualizes the Pareto trade-off between K_J fit and weight constraint across different lambda values.
Arguments
- tradeoff_data
Data frame from compute_tradeoff_curve().
- metric
Which metric to plot on y-axis: "w1_prob_gt_50" (default), "E_w1", "K_loss", or "var_K".
- target_value
Optional target value to mark with horizontal line.
- engine
"ggplot2" (default) or "base".
- base_size
Base font size.
- title
Optional title.
- show
If TRUE, print the plot.
Examples
curve <- compute_tradeoff_curve(
J = 50,
K_target = list(mu_K = 5, var_K = 8),
w1_target = list(prob = list(threshold = 0.5, value = 0.25)),
lambda_seq = seq(0, 1, by = 0.1)
)
plot_tradeoff_curve(curve, target_value = 0.25)