mergeparameters: New parameters from merging two Gaussian mixture components

View source: R/mergenormals.R

mergeparametersR Documentation

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

probs

see 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.

muarray

see above; weighted mean of means of component j1 and j2 is now in place j1.

Sigmaarray

see above; weighted covariance matrix handled as above.

z

see above; original entries for columns j1 and j2 are summed up and now in column j1.

Author(s)

Christian Hennig christian.hennig@unibo.it https://www.unibo.it/sitoweb/christian.hennig/en/

References

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

Examples

  options(digits=3)
  set.seed(98765)
  require(mclust)
  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
  mpi <- mergeparameters(iriss,1,2,probs,muarray,Sigmaarray,z)
  mpi$probs
  mpi$muarray

fpc documentation built on Jan. 7, 2023, 1:13 a.m.