mclust (version 3.4.7)

mclustBIC: BIC for Model-Based Clustering

Description

BIC for EM initialized by model-based hierarchical clustering for parameterized Gaussian mixture models.

Usage

mclustBIC(data, G=NULL, modelNames=NULL, prior=NULL, control=emControl(), 
          initialization=list(hcPairs=NULL, subset=NULL, noise=NULL), 
          Vinv=NULL, warn=FALSE, x=NULL, ...)

Arguments

data
A numeric vector, 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.
G
An integer vector specifying the numbers of mixture components (clusters) for which the BIC is to be calculated. The default is G=1:9, unless the argument x is specified, in which case the default is taken from the
modelNames
A vector of character strings indicating the models to be fitted in the EM phase of clustering. The help file for mclustModelNames describes the available models. The default is c("E", "V") for univariate data and
prior
The default assumes no prior, but this argument allows specification of a conjugate prior on the means and variances through the function priorControl.
control
A list of control parameters for EM. The defaults are set by the call emControl().
initialization
A list containing zero or more of the following components:
  • hcPairs
{ A matrix of merge pairs for hierarchical clustering such as produced by function hc. For multivariate data, the default is to compute a hier

Value

  • Bayesian Information Criterion for the specified mixture models numbers of clusters. Auxiliary information returned as attributes.

item

  • Vinv
  • warn
  • x
  • ...

code

do.call

References

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

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 (2005). Bayesian regularization for normal mixture estimation and model-based clustering. Technical Report, Department of Statistics, University of Washington.

C. Fraley and A. E. Raftery (2007). Bayesian regularization for normal mixture estimation and model-based clustering. Journal of Classification 24:155-181.

See Also

priorControl, emControl, mclustModel, summary.mclustBIC, hc, me, mclustModelNames, mclustOptions

Examples

Run this code
irisBIC <- mclustBIC(iris[,-5])
irisBIC
plot(irisBIC)

subset <- sample(1:nrow(iris), 100)
irisBIC <- mclustBIC(iris[,-5], initialization=list(subset =subset))
irisBIC
plot(irisBIC)

irisBIC1 <- mclustBIC(iris[,-5], G=seq(from=1,to=9,by=2), 
                    modelNames=c("EII", "EEI", "EEE"))
irisBIC1
plot(irisBIC1)
irisBIC2  <- mclustBIC(iris[,-5], G=seq(from=2,to=8,by=2), 
                       modelNames=c("VII", "VVI", "VVV"), x= irisBIC1)
irisBIC2
plot(irisBIC2)

nNoise <- 450
set.seed(0)
poissonNoise <- apply(apply( iris[,-5], 2, range), 2, function(x, n) 
                      runif(n, min = x[1]-.1, max = x[2]+.1), n = nNoise)
set.seed(0)
noiseInit <- sample(c(TRUE,FALSE),size=nrow(iris)+nNoise,replace=TRUE,
                    prob=c(3,1))
irisNdata <- rbind(iris[,-5], poissonNoise)
irisNbic <- mclustBIC(data = irisNdata,
                      initialization = list(noise = noiseInit))
irisNbic
plot(irisNbic)

Run the code above in your browser using DataLab