Learn R Programming

apcluster (version 1.3.0)

APResult-class: Class "APResult"

Description

S4 class for storing results of affinity propagation clustering. It extends the class ExClust.

Arguments

Objects

Objects of this class can be created by calling apcluster or apclusterL for a given similarity matrix or calling one of these procedures with a data set and a similarity measure.

Extends

Class "ExClust", directly.

References

http://www.bioinf.jku.at/software/apcluster

Bodenhofer, U., Kothmeier, A., and Hochreiter, S. (2011) APCluster: an R package for affinity propagation clustering. Bioinformatics 27, 2463-2464. DOI: http://dx.doi.org/10.1093/bioinformatics/btr406{10.1093/bioinformatics/btr406}.

Frey, B. J. and Dueck, D. (2007) Clustering by passing messages between data points. Science 315, 972-976.

See Also

apcluster, apclusterL, show-methods, plot-methods, labels-methods, cutree-methods

Examples

Run this code
## create two Gaussian clouds
cl1 <- cbind(rnorm(100,0.2,0.05),rnorm(100,0.8,0.06))
cl2 <- cbind(rnorm(50,0.7,0.08),rnorm(50,0.3,0.05))
x <- rbind(cl1,cl2)

## compute similarity matrix (negative squared Euclidean)
sim <- negDistMat(x, r=2)

## run affinity propagation
apres <- apcluster(sim, details=TRUE)

## show details of clustering results
show(apres)

## plot information about clustering run
plot(apres)

## plot clustering result
plot(apres, x)

## plot heatmap
heatmap(apres, sim)

Run the code above in your browser using DataLab