Plot a cluster fit
plot.dpmixgpd_cluster_fit.RdVisualize either the posterior similarity matrix, the posterior number of occupied clusters, the size distribution of the representative clusters, or cluster-specific response summaries.
Arguments
- x
A cluster fit.
- which
Plot type:
"psm": posterior similarity matrix heatmap"k": posterior number of occupied clusters"sizes": bar chart of representative cluster sizes"summary": cluster-specific response summaries
- burnin
Number of initial posterior draws to discard.
- thin
Keep every
thin-th posterior draw.- psm_max_n
Maximum training sample size allowed for PSM plotting.
- top_n
Number of populated representative clusters to display for
which = "sizes"orwhich = "summary". UseNULLto display all populated clusters.- order_by
Ordering rule for cluster displays:
"size": decreasing cluster size"label": ascending cluster label
- plotly
Logical; if
TRUE, convert theggplot2output to aplotly/htmlwidgetrepresentation via.wrap_plotly(). Defaults togetOption("CausalMixGPD.plotly", FALSE).- ...
Unused.
Details
This plot method exposes the main posterior diagnostics for clustering. The
which = "k" view tracks the number of occupied clusters across retained
draws, which = "psm" visualizes pairwise co-clustering probabilities,
which = "sizes" displays the size profile of the representative partition,
and which = "summary" shows response summaries conditional on the selected
representative labels.
The representative partition is obtained from
predict.dpmixgpd_cluster_fit() using Dahl's least-squares rule. As a
result, the sizes and summary views describe that representative
clustering rather than the full posterior distribution over partitions.
See also
predict.dpmixgpd_cluster_fit(), summary.dpmixgpd_cluster_fit(),
plot.dpmixgpd_cluster_psm(), plot.dpmixgpd_cluster_labels().
Other cluster workflow:
dpmgpd.cluster(),
dpmix.cluster(),
plot.dpmixgpd_cluster_bundle(),
plot.dpmixgpd_cluster_labels(),
plot.dpmixgpd_cluster_psm(),
predict.dpmixgpd_cluster_fit(),
print.dpmixgpd_cluster_bundle(),
print.dpmixgpd_cluster_fit(),
print.dpmixgpd_cluster_labels(),
print.dpmixgpd_cluster_psm(),
summary.dpmixgpd_cluster_bundle(),
summary.dpmixgpd_cluster_fit(),
summary.dpmixgpd_cluster_labels(),
summary.dpmixgpd_cluster_psm()