| randProj {mclust} | R Documentation |
Plots random projections given multidimensional data and parameters of an MVN mixture model for the data.
randProj(data, seeds=0, parameters=NULL, z=NULL,
classification=NULL, truth=NULL, uncertainty=NULL,
what = c("classification", "errors", "uncertainty"),
quantiles = c(0.75, 0.95), symbols=NULL, colors=NULL, scale = FALSE,
xlim=NULL, ylim=NULL, CEX = 1, PCH = ".", main = FALSE, ...)
data |
A numeric matrix or data frame of observations. Categorical variables are not allowed. If a matrix or data frame, rows correspond to observations and columns correspond to variables. |
seeds |
A vector if integer seeds for random number generation.
Elements should be in the range |
parameters |
A named list giving the parameters of an MCLUST model, used to produce superimposing ellipses on the plot. The relevant components are as follows:
|
z |
A matrix in which the |
classification |
A numeric or character vector representing a classification of
observations (rows) of |
truth |
A numeric or character vector giving a known
classification of each data point.
If |
uncertainty |
A numeric vector of values in (0,1) giving the
uncertainty of each data point. If present argument |
what |
Choose from one of the following three options: |
quantiles |
A vector of length 2 giving quantiles used in plotting uncertainty. The smallest symbols correspond to the smallest quantile (lowest uncertainty), medium-sized (open) symbols to points falling between the given quantiles, and large (filled) symbols to those in the largest quantile (highest uncertainty). The default is (0.75,0.95). |
symbols |
Either an integer or character vector assigning a plotting symbol to each
unique class in |
colors |
Either an integer or character vector assigning a color to each
unique class in |
scale |
A logical variable indicating whether or not the two chosen
dimensions should be plotted on the same scale, and
thus preserve the shape of the distribution.
Default: |
xlim, ylim |
Arguments specifying bounds for the ordinate, abscissa of the plot. This may be useful for when comparing plots. |
CEX |
An argument specifying the size of the plotting symbols. The default value is 1. |
PCH |
An argument specifying the symbol to be used when a classificatiion has not been specified for the data. The default value is a small dot ".". |
main |
A logical variable or |
... |
Other graphics parameters. |
A plot showing a random two-dimensional projection of the data, together with the location of the mixture components, classification, uncertainty, and/or classification errors.
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, 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.
clPairs,
coordProj,
mclust2Dplot,
mclust.options
est <- meVVV(iris[,-5], unmap(iris[,5]))
## Not run:
par(pty = "s", mfrow = c(1,1))
randProj(iris[,-5], seeds=1:3, parameters = est$parameters, z = est$z,
what = "classification", main = TRUE)
randProj(iris[,-5], seeds=1:3, parameters = est$parameters, z = est$z,
truth = iris[,5], what = "errors", main = TRUE)
randProj(iris[,-5], seeds=1:3, parameters = est$parameters, z = est$z,
what = "uncertainty", main = TRUE)
## End(Not run)