Skip to contents

Creates a bar plot comparing ARI and VAF values across different methods, including Two-step baselines. This visualization highlights the performance differences between single-model approaches, two-step baselines, and mixture models.

Usage

plot_fig1_baseline_comparison(df, metric = c("ARI", "VAF"))

Arguments

df

A data.frame with columns Method, ARI, VAF. Typically the output from simulate_and_compare_5methods.

metric

Character string specifying which metric to plot: "ARI" or "VAF". Defaults to "ARI".

Value

A ggplot object showing a bar plot of the specified metric by method.

Details

The plot uses color coding to distinguish between method types:

  • Single methods (SingleFA, SinglePCA) - shown in one color group

  • Two-step methods (TwoStep_FA, TwoStep_PCA) - shown in another color group

  • Mixture methods (MixtureFA, MixturePCA) - shown in a third color group

This visualization is designed to demonstrate the superiority of mixture-based approaches over simpler baseline methods.

Examples

if (FALSE) { # \dontrun{
df_comp <- simulate_and_compare_5methods(
  N = 100, K_true = 3, r_true = 4, M = 6, T_each = 100
)
p_ari <- plot_fig1_baseline_comparison(df_comp, metric = "ARI")
p_vaf <- plot_fig1_baseline_comparison(df_comp, metric = "VAF")
print(p_ari)
ggsave("baseline_comparison_ARI.pdf", p_ari, width = 8, height = 6)
} # }