mixmodMap: Computes a hard clustering corresponding to a soft clustering

Description Usage Arguments Value Author(s) References Examples

Description

Computes the hard clustering through the Maximum A Posteriori rule from the matrix of a posteriori probabilities (soft clustering).

Usage

1
mixmodMap(tau, n = nrow(tau), K = ncol(tau))

Arguments

tau

matrix with posterior probabilities of each class for each observation (classes in columns, observations in rows).

n

number of observations.

K

number of classes.

Value

a matrix of same dimensions as tau. For each observation (row), only zeros except for the column corresponding to the cluster to which the observation is assigned, which value is one.

Author(s)

J.-P. Baudry and G. Celeux

References

J.-P. Baudry, A. E. Raftery, G. Celeux, K. Lo and R. Gottardo (2010). Combining mixture components for clustering. Journal of Computational and Graphical Statistics, 19(2):332-353.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
set.seed(1)

data(Baudry_etal_2010_JCGS_examples)
res <- mixmodCombi(ex4.1, nbCluster = 1:8)

res@hierarchy[[3]]@proba[1:10,] # Is the matrix of posterior probabilities of each of the combined
# classes in the 3-class solution, for the 10 first observations

mixmodMap(res@hierarchy[[3]]@proba[1:10,]) # Is the matrix of corresponding class assignments for 
# the 10 first observations (available as a labels vector: res@hierarchy[[3]]@partition[1:10])


Search within the RmixmodCombi package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.