mclustSBIC: Singular BIC for Model-Based Clustering

Description Usage Arguments Value References See Also Examples

Description

Extension of BIC for parameterized Gaussian mixture models fitted by EM algorithm initialized by model-based hierarchical clustering. This modified BIC resolves the difficulties connected to singular model selection problems, i.e. problems that involve models with Fisher information matrices that may fail to be invertable.

Usage

1
2
3
4
5
6
7
mclustSBIC(data, G = NULL, modelNames = NULL, 
          restart=100, 
          initialization = list(hcPairs = NULL, 
                                subset = NULL, 
                                noise = NULL), 
          x = NULL, dir = 0.1, 
          ...)

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 sBIC 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 values associated with x.

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

mclust.options("emModelNames")

for multivariate data (n > d)

c("EII", "VII", "EEI", "EVI", "VEI", "VVI")

the spherical and diagonal models for multivariate data (n <= d)

unless the argument x is specified, in which case the default is taken from the values associated with x.

restart

Number of different random restarts of the EM algorithm. This is invoked only when the default optimization used in the function mclustBIC returns NA for the maximum log-likelihood.

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 hierarchical agglomerative clustering tree by applying function hc with model specified by mclust.options("hcModelName"), and data transformation set by mclust.options("hcUse").
All the input or a subset as indicated by the subset argument is used for initial clustering.
The hierarchical clustering results are then used to start the EM algorithm from a given partition.
For univariate data, the default is to use quantiles to start the EM algorithm. However, hierarchical clustering could also be used by calling hc with model specified as "V" or "E".

subset

A logical or numeric vector specifying a subset of the data to be used in the initial hierarchical clustering phase. By default no subset is used unless the number of observations exceeds the value specified by mclust.options("subset"). The subset argument is ignored if hcPairs are provided. Note that to guarantee exact reproducibility of results a seed must be specified (see set.seed).

noise

A logical or numeric vector indicating an initial guess as to which observations are noise in the data. If numeric the entries should correspond to row indexes of the data. If supplied, a noise term will be added to the model in the estimation.

x

An object of class 'mclustBIC'. If supplied, mclustBIC will use the settings in x to produce another object of class 'mclustBIC', but with G and modelNames as specified in the arguments. Models that have already been computed in x are not recomputed. All arguments to mclustBIC except data, G and modelName are ignored and their values are set as specified in the attributes of x. Defaults for G and modelNames are taken from x.

dir

Determines Dirichlet prior parameter to φ = dir * (r/2 + 1) + r/2, where r is the number of parameters for each mixture component. It is a prior for the distribution of the random vector of mixture weights.

...

Catches unused arguments in indirect or list calls via do.call.

Value

Return an object of class 'mclustBIC', a matrix containing the Singular Bayesian Information Criterions for the respective number of mixture components (rows) and model (columns). Auxiliary information returned as attributes.

The corresponding print method shows the matrix of values and the top three models according to the sBIC criterion.

References

Scrucca L., Fop M., Murphy T. B. and Raftery A. E. (2016) mclust 5: clustering, classification and density estimation using Gaussian finite mixture models, The R Journal, 8/1, pp. 289-317.

Drton M. and Plummer M. (2017) A Bayesian information criterion for singular models, Journal of the Royal Statistical Society, Series B, 79, Part 2, pp. 323-380.

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

Fraley C., Raftery A. E., Murphy T. B. and Scrucca L. (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

mclustMaxLik, mclustSBIClearnCoeff, nMclustParamsComp, nMclustParamsShared, priorControl, emControl, mclustModel, summary.mclustSBIC, hc, me, mclustModelNames, mclust.options

Examples

 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
irisSBIC <- mclustSBIC(iris[,-5])
irisSBIC
plot(irisSBIC)

## Not run: 
subset <- sample(1:nrow(iris), 100)
irisSBIC <- mclustSBIC(iris[,-5], initialization=list(subset = subset))
irisSBIC
plot(irisSBIC)

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

## End(Not run)

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)
irisNsbic <- mclustSBIC(data = irisNdata, G = 1:5,
                      initialization = list(noise = noiseInit))
irisNsbic
plot(irisNsbic)

radeksalac/mclustSBIC documentation built on Jan. 15, 2022, 8:12 a.m.