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", "mu_K", 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.
See also
DPprior_fit for fitting, plot.DPprior_fit for S3 plot method
Other visualization:
DPprior_colors(),
plot_K_prior(),
plot_alpha_prior(),
plot_dual_comparison(),
plot_dual_dashboard(),
plot_prior_dashboard(),
plot_tradeoff_dashboard(),
plot_w1_prior(),
theme_DPprior()
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)