Learn R Programming

fpc (version 2.1-6)

mergenormals: Clustering by merging Gaussian mixture components

Description

Clustering by merging Gaussian mixture components; computes all methods introduced in Hennig (2010) from an initial mclust clustering. See details section for details.

Usage

mergenormals(xdata, mclustsummary=NULL, 
                         clustering, probs, muarray, Sigmaarray, z,
                         method=NULL, cutoff=NULL, by=0.005,
                         numberstop=NULL, renumber=TRUE, M=50, ...)

## S3 method for class 'mergenorm': summary(object, ...)

## S3 method for class 'summary.mergenorm': print(x, ...)

Arguments

xdata
data (something that can be coerced into a matrix).
mclustsummary
output object from summary.mclustBIC for xdata. Either mclustsummary or all of clustering, probs, muarray,
clustering
vector of integers. Initial assignment of data to mixture components.
probs
vector of component proportions (for all components; should sum up to one).
muarray
matrix of component means (rows).
Sigmaarray
array of component covariance matrices (third dimension refers to component number).
z
matrix of observation- (row-)wise posterior probabilities of belonging to the components (columns).
method
one of "bhat", "ridge.uni", "ridge.ratio", "demp", "dipuni", "diptantrum", "predictive". See details.
cutoff
numeric between 0 and 1. Tuning constant, see details and Hennig (2010). If not specified, the default values given in (9) in Hennig (2010) are used.
by
real between 0 and 1. Interval width for density computation along the ridgeline, used for methods "ridge.uni" and "ridge.ratio". Methods "dipuni" and "diptantrum" require ridgeline computati
numberstop
integer. If specified, cutoff is ignored and components are merged until the number of clusters specified here is reached.
renumber
logical. If TRUE merged clusters are renumbered from 1 to their number. If not, numbers of the original clustering are used (numbers of components that were merged into others then will not appear).
M
integer. Number of times the dataset is divided into two halves. Used if method="predictive".
...
additional optional parameters to pass on to ridgeline.diagnosis or mixpredictive (in mergenormals).
object
object of class mergenorm, output of mergenormals.
x
object of class summary.mergenorm, output of summary.mergenorm.

Value

  • mergenormals gives out an object of class mergenorm, which is a List with components
  • clusteringinteger vector. Final clustering.
  • clusternumbersvector of numbers of remaining clusters. These are given in terms of the original clusters even of renumber=TRUE, in which case they may be needed to understand the numbering of some further components, see below.
  • defunct.componentsvector of numbers of components that were "merged away".
  • valuemergedvector of values of the merging criterion (see details) at which components were merged.
  • mergedtonumbersvector of numbers of clusters to which the original components were merged.
  • parametersa list, if mclustsummary was provided. Entry no. i refers to number i in clusternumbers. The list entry i contains the parameters of the original mixture components that make up cluster i, as extracted by extract.mixturepars.
  • predvaluesvector of prediction strength values for clusternumbers from 1 to the number of components in the original mixture, if method=="predictive". See mixpredictive.
  • orig.decisionmatrixsquare matrix with entries giving the original values of the merging criterion (see details) for every pair of original mixture components.
  • new.decisionmatrixsquare matrix as orig.decisionmatrix, but with final entries; numbering of rows and columns corresponds to clusternumbers; all entries corresponding to other rows and columns can be ignored.
  • probsfinal cluster values of probs (see arguments) for merged components, generated by (potentially repeated) execution of mergeparameters out of the original ones. Numbered according to clusternumbers.
  • muarrayfinal cluster means, analogous to probs.
  • Sigmaarrayfinal cluster covariance matrices, analogous to probs.
  • zfinal matrix of posterior probabilities of observations belonging to the clusters, analogous to probs.
  • noiselogical. If TRUE, there was a noise component fitted in the initial mclust clustering (see help for initialization in mclustBIC). In this case, a cluster number 0 indicates noise. noise is ignored by the merging methods and kept as it was originally.
  • methodas above.
  • cutoffas above.
  • summary.mergenorm gives out a list with components clustering, clusternumbers, defunct.components, valuemerged, mergedtonumbers, predvalues, probs, muarray, Sigmaarray, z, noise, method, cutoff as above, plus onc (original number of components) and mnc (number of clusters after merging).

Details

Mixture components are merged in a hierarchical fashion. The merging criterion is computed for all pairs of current clusters and the two clusters with the highest criterion value (lowest, respectively, for method="predictive") are merged. Then criterion values are recomputed for the merged cluster. Merging is continued until the criterion value to merge is below (or above, for method="predictive") the cutoff value. Details are given in Hennig (2010). The following criteria are offered, specified by the method-argument. [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

References

J. A. Hartigan and P. M. Hartigan (1985) The Dip Test of Unimodality, Annals of Statistics, 13, 70-84.

Hennig, C. (2010) Methods for merging Gaussian mixture components, Advances in Data Analysis and Classification, 4, 3-34. Ray, S. and Lindsay, B. G. (2005) The Topography of Multivariate Normal Mixtures, Annals of Statistics, 33, 2042-2065.

Tantrum, J., Murua, A. and Stuetzle, W. (2003) Assessment and Pruning of Hierarchical Model Based Clustering, Proceedings of the ninth ACM SIGKDD international conference on Knowledge discovery and data mining, Washington, D.C., 197-205.

Tibshirani, R. and Walther, G. (2005) Cluster Validation by Prediction Strength, Journal of Computational and Graphical Statistics, 14, 511-528.

Examples

Run this code
data(crabs)
  dc <- crabs[,4:8]
  cm <- mclustBIC(crabs[,4:8],G=9,modelNames="EEE")
  scm <- summary(cm,crabs[,4:8])
  cmnbhat <- mergenormals(crabs[,4:8],scm,method="bhat")
  summary(cmnbhat)
  cmndemp <- mergenormals(crabs[,4:8],scm,method="demp")
  summary(cmndemp)
# Other methods take a bit longer, but try them!
# The values of by and M below are still chosen for reasonably fast execution.
# cmnrr <- mergenormals(crabs[,4:8],scm,method="ridge.ratio",by=0.05)
# cmd <- mergenormals(crabs[,4:8],scm,method="dip.tantrum",by=0.05)
# cmp <- mergenormals(crabs[,4:8],scm,method="predictive",M=3)

Run the code above in your browser using DataLab