Plot Method for mixture_r_selection Objects
Source:R/r_selection_mixture.R
plot.mixture_r_selection.RdVisualize r-selection results with multiple plot types.
Arguments
- x
A mixture_r_selection object.
- type
Type of plot to generate. Options:
"overview" (default): Multi-panel overview showing all available plots
"global_cv": Global CV curve (only for hybrid/global-first modes with CV criterion)
"cluster_metrics": Heatmap of cluster-specific metrics across r values
"r_comparison": Bar plot comparing r_global and cluster-specific r values
"cluster_scores": Line plot of composite scores for each cluster across r values
- ...
Additional arguments (ignored).
Details
The plot method provides several visualization types depending on the selection mode:
For global-first mode: - "global_cv": Shows CV error curve with selected r_global
For clusterwise mode: - "cluster_metrics": Heatmap of VAF/VSS/smoothness for each cluster and r value - "cluster_scores": Composite scores showing how each cluster's metrics vary with r
For hybrid mode: - All of the above plus "r_comparison" showing r_global vs cluster-specific r values
The "overview" type automatically generates a multi-panel plot with all relevant visualizations for the given mode.
Examples
if (FALSE) { # \dontrun{
result <- select_r_mixture(list_of_data, K = 3, mode = "hybrid")
plot(result) # Overview
plot(result, type = "global_cv")
plot(result, type = "cluster_metrics")
plot(result, type = "r_comparison")
} # }