Learn R Programming

fpc (version 2.1-6)

mergeparameters: New parameters from merging two Gaussian mixture components

Description

Re-computes pointwise posterior probabilities, mean and covariance matrix for a mixture component obtained by merging two mixture components in a Gaussian mixture.

Usage

mergeparameters(xdata, j1, j2, probs, muarray,Sigmaarray, z)

Arguments

xdata
data (something that can be coerced into a matrix).
j1
integer. Number of first mixture component to be merged.
j2
integer. Number of second mixture component to be merged.
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).

Value

  • List with components
  • probssee above; sum of probabilities for original components j1 and j2 is now probs[j1]. Note that generally, also for the further components, values for the merged component are in place j1 and values in place j2 are not changed. This means that in order to have only the information for the new mixture after merging, the entries in places j2 need to be suppressed.
  • muarraysee above; weighted mean of means of component j1 and j2 is now in place j1.
  • Sigmaarraysee above; weighted covariance matrix handled as above.
  • zsee above; original entries for columns j1 and j2 are summed up and now in column j1.

References

Hennig, C. (2010) Methods for merging Gaussian mixture components, Advances in Data Analysis and Classification, 4, 3-34.

Examples

Run this code
set.seed(98765)
  iriss <- iris[sample(150,20),-5]
  irisBIC <- mclustBIC(iriss)
  siris <- summary(irisBIC,iriss)
  probs <- siris$parameters$pro
  muarray <- siris$parameters$mean
  Sigmaarray <- siris$parameters$variance$sigma
  z <- siris$z
  mergeparameters(iriss,1,2,probs,muarray,Sigmaarray,z)

Run the code above in your browser using DataLab