Last data update: 2014.03.03

R: Estimate Posterior Similarity Matrix
comp.psmR Documentation

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

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.

Value

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

Author(s)

Arno Fritsch, arno.fritsch@tu-dortmund.de

See Also

cltoSim

Examples

(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)

Results