Plot of a Dirichlet process mixture of gaussian distribution partition
Source:R/plot_DPM.R
plot_DPM.Rd
Plot of a Dirichlet process mixture of gaussian distribution partition
Arguments
- z
data matrix
d x n
withd
dimensions in rows andn
observations in columns.- U_mu
either a list or a matrix containing the current estimates of mean vectors of length
d
for each cluster. Default isNULL
in which caseU_SS
has to be provided.- U_Sigma
either a list or an array containing the
d x d
current estimates for covariance matrix of each cluster. Default isNULL
in which caseU_SS
has to be provided.- m
vector of length
n
containing the number of observations currently assigned to each clusters.- c
allocation vector of length
n
indicating which observation belongs to which clusters.- i
current MCMC iteration number.
- alpha
current value of the DP concentration parameter.
- U_SS
a list containing
"mu"
and"S"
. Default isNULL
in which caseU_mu
andU_Sigma
have to be provided.- dims2plot
index vector, subset of
1:d
indicating which dimensions should be drawn. Default is all of them.- ellipses
a logical flag indicating whether ellipses should be drawn around clusters. Default is
TRUE
if only 2 dimensions are plotted,FALSE
otherwise.- gg.add
a list of instructions to add to the
ggplot2
instruction (seegg-add
). Default islist(theme())
, which adds nothing to the plot.