Learn R Programming

mclust (version 3.4.7)

plot.Mclust: Plot Model-Based Clustering Results

Description

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

Usage

## S3 method for class 'Mclust':
plot(x, data = NULL, what = c("BIC", "classification", 
        "uncertainty", "density"), dimens = c(1,2), xlab = NULL, ylim = NULL,
            legendArgs = list(x = "bottomright", ncol = 2, cex = 1), 
            identify = TRUE, ...)

Arguments

x
Output from Mclust.
data
The data used to produce x.
what
Choose one or more of: "BIC", "classification", "uncertainty". If the data dimension is less than 3, "density" can also be chosen.
dimens
A vector of length 2 giving the integer dimensions of the desired coordinate projections for multivariate data. The default is c(1,2), in which the first dimension is plotted against the second.
xlab
Optional label for the horizontal axis of the BIC plot.
ylim
Optiomnal limits for the vertical axis of the BIC plot.
legendArgs
Arguments to pass to the legend function. Set to NULL for no legend.
identify
A logical variable indicating whether or not to add a title to the plot identifying the dimensions used.
...
Other graphics parameters.

Value

  • Model-based clustering plots: BIC values used for choosing the number of clusters. For data in more than two dimensions, a pairs plot of the showing the classification, a coordinate projections of the data showing location of the mixture components, classification, and uncertainty. For univariate and bivariate data, plots showing location of the mixture components, classification, uncertainty, and density.

References

C. Fraley and A. E. Raftery (2002). Model-based clustering, discriminant analysis, and density estimation. Journal of the American Statistical Association 97:611-631.

C. Fraley and A. E. Raftery (2006, revised 2010). MCLUST Version 3 for R: Normal Mixture Modeling and Model-Based Clustering, Technical Report no. 504, Department of Statistics, University of Washington.

Details

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

See Also

Mclust, mclust1Dplot, mclust2Dplot, surfacePlot, coordProj, randProj

Examples

Run this code
plot(Mclust(precip),precip)

plot(Mclust(faithful),faithful)

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

Run the code above in your browser using DataLab