show-methods {apcluster}R Documentation

Display Clustering Result Objects

Description

Display methods for S4 classes APResult, ExClust, and AggExResult

Usage

## S4 method for signature 'APResult'
show(object)
## S4 method for signature 'ExClust'
show(object)
## S4 method for signature 'AggExResult'
show(object)

Arguments

object

an object of class APResult, ExClust, or AggExResult

Details

show displays the most important information stored in object.

For APResult objects, the number of data samples, the number of clusters, the number of iterations, the input preference, the final objective function values, the vector of exemplars, the list of clusters and for leveraged clustering the selected sample subset are printed.

For ExClust objects, the number of data samples, the number of clusters, the vector of exemplars, and list of clusters are printed.

For AggExResult objects, only the number of data samples and the maximum number of clusters are printed. For retrieving a particular clustering level, use the function cutree.

For accessing more detailed information, it is necessary to access the slots of object directly. Use str to get a compact overview of all slots of an object.

Value

show returns an invisible NULL

Author(s)

Ulrich Bodenhofer, Andreas Kothmeier & Johannes Palme apcluster@bioinf.jku.at

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: doi:10.1093/bioinformatics/btr406.

See Also

APResult, ExClust, AggExResult, cutree-methods

Examples

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

## show details of clustering results
show(apres)

## apply agglomerative clustering to apres
aggres <- aggExCluster(sim, apres)

## display overview of result
show(aggres)

## show clustering level with two clusters
show(cutree(aggres, 2))

[Package apcluster version 1.4.11 Index]