Learn R Programming

mcclust (version 1.0.1)

comp.psm: Estimate Posterior Similarity Matrix

Description

For a sample of clusterings of the same objects the proportion of clusterings in which observation \(i\) and \(j\) are together in a cluster is computed and a matrix containing all proportions is given out.

Usage

comp.psm(cls)

Arguments

cls

a matrix in which every row corresponds to a clustering of the ncol(cls) objects

Value

a symmetric ncol(cls)*ncol(cls) matrix

Details

In Bayesian cluster analysis the posterior similarity matrix is a matrix whose entry \([i,j]\) contains the posterior probability that observation \(i\) and \(j\) are together in a cluster. It is estimated by the proportion of a posteriori clusterings in which \(i\) and \(j\) cluster together.

See Also

cltoSim

Examples

Run this code
# NOT RUN {
(cls <- rbind(c(1,1,2,2),c(1,1,2,2),c(1,2,2,2),c(2,2,1,1)))
comp.psm(cls)
# }

Run the code above in your browser using DataLab