plotpsm: Plot a heat map of the posterior similarity matrix

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Produces a heat map of the posterior similarity matrix with data points reordered by hierarchical clustering.

Usage

1
plotpsm(psm, method = "complete", ...)

Arguments

psm

a posterior similarity matrix, which can be obtained from MCMC samples of clusterings through a call to comp.psm.

method

the agglomeration method to be used in hierarchical clustering. Defaults to "complete". See hclust.

...

other inputs to image.

Details

Produces a heatmap of the posterior similarity matrix with red representing high posterior probability of one and white representing low posterior probability of zero. Data points are first reordered by hierarchical clustering to increasing legibility.

Value

Produces a heatmap of the posterior similarity matrix.

Author(s)

Sara Wade, sara.wade@eng.cam.ac.uk

See Also

comp.psm for computing posterior similarity matrix; hclust for hierarchical clustering; and credibleball for an alternative representation of uncertainty in the posterior on clusterings.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(ex1.data)
x=ex1.data[,c(1,2)]
cls.true=ex1.data$cls.true
plot(x[,1],x[,2],xlab="x1",ylab="x2")
k=max(cls.true)
for(l in 2:k){
points(x[cls.true==l,1],x[cls.true==l,2],col=l)}

# Heat map to represent posterior uncertainty
data(ex1.draw)
psm=comp.psm(ex1.draw)
plotpsm(psm)

muschellij2/mcclust.ext documentation built on May 26, 2019, 9:36 a.m.