Plot results for fitted MoE_clust mixture models with gating &/or expert network covariates: generalised pairs plots, model selection criteria, the log-likelihood vs. the EM iterations, and the gating network are all currently visualisable.
## S3 method for class 'MoEClust'plot(x, what = c("gpairs","gating","criterion","loglik","similarity","uncertainty"),...)
Arguments
x: An object of class "MoEClust" generated by MoE_clust, or an object of class "MoECompare" generated by MoE_compare. Models with a noise component are facilitated here too.
what: The type of graph requested:
gpairs: A generalised pairs plot. To further customise this plot, arguments to MoE_gpairs can be supplied.
gating: The gating network. To further customise this plot, arguments to MoE_plotGate and matplot can be supplied.
criterion: The model selection criteria. To further customise this plot, arguments to MoE_plotCrit and plot.mclustBIC can be supplied.
loglik: The log-likelihood vs. the iterations of the EM algorithm. To further customise this plot, arguments to MoE_plotLogLik and plot can be supplied.
similarity: The similarity matrix constructed from x$z at convergence, in the form of a heatmap. To further customise this plot, arguments to MoE_Similarity can be supplied.
uncertainty: The clustering uncertainty for every observation. To further customise this plot, arguments to MoE_Uncertainty can be supplied.
By default, all of the above graphs are produced.
...: Optional arguments to be passed to MoE_gpairs, MoE_plotGate, MoE_plotCrit, MoE_plotLogLik, MoE_Similarity, MoE_Uncertainty, matplot, plot.mclustBIC and plot. In particular, the argument legendArgs to plot.mclustBIC can be passed to MoE_plotCrit.
Returns
The visualisation according to what of the results of a fitted MoEClust model.
Details
For more flexibility in plotting, use MoE_gpairs, MoE_plotGate, MoE_plotCrit, MoE_plotLogLik, MoE_Similarity, and MoE_Uncertainty directly.
Note
Other plotting options are available by first calling as.Mclust on the fitted object, and then calling plot.Mclust on the results. However, caution is advised for models with gating &/or expert covariates (see the Note in as.Mclust).
Examples
data(ais)res <- MoE_clust(ais[,3:7], gating=~ BMI, expert=~ sex, G=2, modelNames="EVE", network.data=ais)# Plot the gating networkplot(res, what="gating", x.axis=ais$BMI, xlab="BMI")# Plot the log-likelihoodplot(res, what="loglik", col="blue")# Plot the uncertainty profileplot(res, what="uncertainty", type="profile")# Produce a generalised pairs plotplot(res, what="gpairs")# Produce a heatmap of the similarity matrixplot(res, what="similarity")# Modify the gpairs plot by passing arguments to MoE_gpairs()plot(res, what="gpairs", response.type="density", varwidth=TRUE, show.dens=TRUE, data.ind=c(5,3,4,1,2), jitter=FALSE, show.counts=FALSE)
References
Murphy, K. and Murphy, T. B. (2020). Gaussian parsimonious clustering models with covariates and a noise component. Advances in Data Analysis and Classification, 14(2): 293-325. <tools:::Rd_expr_doi("10.1007/s11634-019-00373-8") >.