Learn R Programming

apcluster (version 1.2.1)

ExClust-class: Class "ExClust"

Description

S4 class for storing exemplar-based clusterings

Arguments

Objects

Objects of this class can be created by calling cutree to cut out a clustering level from a cluster hierarchy of class AggExResult. Moreover, cutree can also be used to convert an object of class APResult to class ExClust.

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}.

See Also

aggExCluster, show-methods, plot-methods, labels-methods, cutree-methods, AggExResult, APResult

Examples

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

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

## run affinity propagation
aggres <- aggExCluster(sim)

## extract level with two clusters
excl <- cutree(aggres, k=2)

## show details of clustering results
show(excl)

## plot information about clustering run
plot(excl, x)

Run the code above in your browser using DataLab