Learn R Programming

mclust (version 4.1)

plot.MclustDR: Plotting method for dimension reduction for model-based clustering and classification

Description

Graphs data projected onto the estimated subspace for model-based clustering and classification.

Usage

## S3 method for class 'MclustDR':
plot(x, dimens, 
     what = c("scatterplot", "pairs", "contour", "classification",
              "boundaries", "density", "evalues"), 
     symbols, colors, col.contour = gray(0.7), col.sep = grey(0.4), 
     ngrid = 100, nlevels = 5, asp = NULL, ...)

Arguments

x
An object of class "MclustDR" resulting from a call to MclustDR.
dimens
A vector of integers giving the dimensions of the desired coordinate projections for multivariate data.
what
The type of graph requested: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
symbols
Either an integer or character vector assigning a plotting symbol to each unique mixture component. Elements in colors correspond to classes in order of appearance in the sequence of observations (the order used by the function
colors
Either an integer or character vector assigning a color to each unique cluster or known class. Elements in colors correspond to classes in order of appearance in the sequence of observations (the order used by the function f
col.contour
The color of contours in case what = "contour".
col.sep
The color of classification boundaries in case what = "classification".
ngrid
An integer specifying the number of grid points to use in evaluating the classification regions.
nlevels
The number of levels to use in case what = "contour".
asp
For scatterplots the $y/x$ aspect ratio, see plot.window.
...
further arguments passed to or from other methods.

References

Scrucca, L. (2010) Dimension reduction for model-based clustering. Statistics and Computing, 20(4), pp. 471-484.

C. Fraley, A. E. Raftery, T. B. Murphy and L. Scrucca (2012). mclust Version 4 for R: Normal Mixture Modeling for Model-Based Clustering, Classification, and Density Estimation. Technical Report No. 597, Department of Statistics, University of Washington.

See Also

MclustDR

Examples

Run this code
mod = Mclust(iris[,1:4])
dr = MclustDR(mod)
plot(dr)
plot(dr, what = "evalues")
plot(dr, what = "scatterplot", dimens = c(1,3))
plot(dr, what = "pairs")
plot(dr, what = "contour")
plot(dr, what = "classification", ngrid = 200)
plot(dr, what = "boundaries", ngrid = 200)
plot(dr, what = "density")
plot(dr, what = "density", dimens = 2)

data(banknote)
da = MclustDA(banknote[,2:7], banknote$Status)
dr = MclustDR(da)
plot(dr)
plot(dr, what = "evalues")
plot(dr, what = "pairs")
plot(dr, what = "contour")
plot(dr, what = "contour", dimens = c(1,3))
plot(dr, what = "classification", ngrid = 200)
plot(dr, what = "boundaries", ngrid = 200)
plot(dr, what = "density")
plot(dr, what = "density", dimens = 2)

Run the code above in your browser using DataLab