-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathmclust.options.Rd
148 lines (133 loc) · 6.12 KB
/
mclust.options.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
\name{mclust.options}
\alias{mclust.options}
\title{Default values for use with MCLUST package}
\description{Set or retrieve default values for use with MCLUST package.}
\usage{
mclust.options(\dots)
}
\arguments{
\item{\dots}{one or more arguments provided in the \code{name = value} form, or no argument at all may be given. \cr
Available arguments are described in the Details section below.}
}
\details{
\code{mclust.options()} is provided for assigning or retrieving default values used by various functions in \code{MCLUST}.\cr
Available options are:
\describe{
\item{\code{emModelNames}}{
A vector of 3-character strings that are associated with multivariate
models for which EM estimation is available in MCLUST. \cr
The current default is all of the multivariate mixture models
supported in MCLUST.
The help file for \code{\link{mclustModelNames}} describes the
available models.
}
\item{\code{hcModelName}}{
A character string specifying the multivariate model to be used in model-based agglomerative hierarchical clustering for initialization of EM algorithm.\cr
The available models are the following:
\describe{
\item{\code{"EII"}}{spherical, equal volume;}
\item{\code{"EEE"}}{ellipsoidal, equal volume, shape, and orientation;}
\item{\code{"VII"}}{spherical, unequal volume;}
\item{\code{"VVV"}}{ellipsoidal, varying volume, shape, and orientation (default).}
}
}
\item{\code{hcUse}}{
A character string specifying the type of input variables/transformation to be used in model-based agglomerative hierarchical clustering for initialization of EM algorithm.\cr
Possible values are:
\describe{
\item{\code{"VARS"}}{original variables;}
\item{\code{"STD"}}{standardized variables (centered and scaled);}
\item{\code{"SPH"}}{sphered variables (centered, scaled and uncorrelated)
computed using SVD;}
\item{\code{"PCS"}}{principal components computed using SVD on centered
variables (i.e. using the covariance matrix);}
\item{\code{"PCR"}}{principal components computed using SVD on standardized
(center and scaled) variables (i.e. using the correlation matrix);}
\item{\code{"SVD"}}{scaled SVD transformation (default);}
\item{\code{"RND"}}{no transformation is applied but a random hierarchical structure is returned (see \code{\link{hcRandomPairs}}).}
}
For further details see Scrucca and Raftery (2015), Scrucca et al. (2016).
}
\item{\code{subset}}{
A value specifying the maximal sample size to be used in the model-based
hierarchical clustering to start the EM algorithm.
If data sample size exceeds this value, a random sample is drawn of size
specified by \code{subset}.
}
\item{\code{fillEllipses}}{
A logical value specifying whether or not to fill with transparent
colors ellipses corresponding to the within-cluster covariances in case
of \code{"classification"} plot for \code{'Mclust'} objects, or
\code{"scatterplot"} graphs for \code{'MclustDA'} objects.
}
\item{\code{bicPlotSymbols}}{
A vector whose entries correspond to graphics symbols for plotting the
BIC values output from \code{\link{Mclust}} and \code{\link{mclustBIC}}.
These are displayed in the legend which appears at the lower right
of the BIC plots.
}
\item{\code{bicPlotColors}}{
A vector whose entries correspond to colors for plotting the
BIC curves from output from \code{\link{Mclust}} and
\code{\link{mclustBIC}}.
These are displayed in the legend which appears at the lower right
of the BIC plots.
}
\item{\code{classPlotSymbols}}{
A vector whose entries are either integers corresponding to graphics
symbols or single characters for indicating classifications when
plotting data. Classes are assigned symbols in the given order.
}
\item{\code{classPlotColors}}{
A vector whose entries correspond to colors for indicating
classifications when plotting data. Classes are assigned colors
in the given order.
}
\item{\code{warn}}{
A logical value indicating whether or not to issue certain warnings.
Most of these warnings have to do with situations in which
singularities are encountered.
The default is \code{warn = FALSE}.
}
}
The parameter values set via a call to this function will remain in effect for the rest of the session, affecting the subsequent behaviour of the functions for which the given parameters are relevant.
}
\value{
If the argument list is empty the function returns the current list of values.
If the argument list is not empty, the returned list is invisible.
}
\seealso{
\code{\link{Mclust}},
\code{\link{MclustDA}},
\code{\link{densityMclust}},
\code{\link{emControl}}
}
\references{
Scrucca L. and Raftery A. E. (2015) Improved initialisation of model-based clustering using Gaussian hierarchical partitions. \emph{Advances in Data Analysis and Classification}, 9/4, pp. 447-460.
Scrucca L., Fop M., Murphy T. B. and Raftery A. E. (2016) mclust 5: clustering, classification and density estimation using Gaussian finite mixture models, \emph{The R Journal}, 8/1, pp. 289-317.
}
\examples{
opt <- mclust.options() # save default values
irisBIC <- mclustBIC(iris[,-5])
summary(irisBIC, iris[,-5])
mclust.options(emModelNames = c("EII", "EEI", "EEE"))
irisBIC <- mclustBIC(iris[,-5])
summary(irisBIC, iris[,-5])
mclust.options(opt) # restore default values
mclust.options()
oldpar <- par(mfrow = c(2,1), no.readonly = TRUE)
n <- with(mclust.options(),
max(sapply(list(bicPlotSymbols, bicPlotColors),length)))
plot(seq(n), rep(1,n), ylab = "", xlab = "", yaxt = "n",
pch = mclust.options("bicPlotSymbols"),
col = mclust.options("bicPlotColors"))
title("mclust.options(\"bicPlotSymbols\") \n mclust.options(\"bicPlotColors\")")
n <- with(mclust.options(),
max(sapply(list(classPlotSymbols, classPlotColors),length)))
plot(seq(n), rep(1,n), ylab = "", xlab = "", yaxt = "n",
pch = mclust.options("classPlotSymbols"),
col = mclust.options("classPlotColors"))
title("mclust.options(\"classPlotSymbols\") \n mclust.options(\"classPlotColors\")")
par(oldpar)
}
\keyword{cluster}