plot.Mclust: Plot Model-Based Clustering Results

Description Usage Arguments Details Value See Also Examples

View source: R/mclust.R

Description

Plot model-based clustering results: BIC, classification, uncertainty and (for univariate and bivariate data) density.

Usage

1
2
3
4
## S3 method for class 'Mclust'
plot(x, what = c("BIC", "classification", "uncertainty", "density"), 
     dimens = NULL, xlab = NULL, ylab = NULL, ylim = NULL,
     addEllipses = TRUE, main = TRUE, ...)

Arguments

x

Output from Mclust.

what

The type of graph requested:

"BIC"
"classification"
"uncertainty"
"density"

By default, all the above graphs are produced. See the description below.

dimens

A vector of length one or two giving the integer dimensions of the desired coordinate projections for multivariate data in case of "classification" or "uncertainty" plots.

xlab, ylab

Optional labels for the x-axis and the y-axis.

ylim

Optional limits for the vertical axis of the BIC plot.

addEllipses

A logical indicating whether or not to add ellipses with axes corresponding to the within-cluster covariances in case of "classification" or "uncertainty" plots.

main

A logical or NULL indicating whether or not to add a title to the plot identifying the dimensions used.

...

Other graphics parameters.

Details

For more flexibility in plotting, use mclust1Dplot, mclust2Dplot, surfacePlot, coordProj, or randProj.

Value

Model-based clustering plots:

"BIC" =

BIC values used for choosing the number of clusters.

"classification" =

a plot showing the clustering. For data in more than two dimensions a pairs plot is produced, followed by a coordinate projection plot using specified dimens.

"uncertainty" =

a plot of classification uncertainty. For data in more than two dimensions a coordinate projection plot is drawn using specified dimens.

"density" =

a plot of estimated density. For two dimensional a contour plot is drawn, while for data in more than two dimensions a matrix of contours for pairs of variables is produced.

See Also

Mclust, plot.mclustBIC, plot.mclustICL, mclust1Dplot, mclust2Dplot, surfacePlot, coordProj, randProj.

Examples

1
2
3
4
5
6
7
8
precipMclust <- Mclust(precip)
plot(precipMclust)

faithfulMclust <- Mclust(faithful)
plot(faithfulMclust)

irisMclust <- Mclust(iris[,-5])
plot(irisMclust)

Example output

Package 'mclust' version 5.3
Type 'citation("mclust")' for citing this R package in publications.

mclust documentation built on Nov. 22, 2017, 5:05 p.m.