Affinity propagation (AP) is a clustering algorithm that has been introduced by Brendan J. Frey and Delbert Dueck. The authors themselves describe affinity propagation as follows:

"An algorithm that identifies exemplars among data points and forms clusters of data points around these exemplars. It operates by simultaneously considering all data point as potential exemplars and exchanging messages between data points until a good set of exemplars and clusters emerges."

AP has been applied in various fields recently, among which bioinformatics is becoming increasingly important. Frey and Dueck have made their algorithm available as Matlab code. Matlab, however, is relatively uncommon in bioinformatics. Instead, the statistical computing platform R has become a widely accepted standard in this field. In order to leverage affinity propagation for bioinformatics applications, we have implemented affinity propagation as an R package. Note, however, that the given package is in no way restricted to bioinformatics applications. It is as generally applicable as Frey’s and Dueck’s original Matlab code.

The package further implements leveraged affinity propagation, exemplar-based agglomerative clustering, and various tools for visual analysis of clustering results.

Changes to previous version:

added sort() function to rearrange clusters according to sort criterion; note that this is an S3 method (see help page for explanation)

improvements and bug fixes of apclusterL() method for signature 'matrix,missing'

performance optimizations of apcluster() and apclusterL()

plotting of clustering results superimposed in scatter plot matrices now also works for 'AggExResult' objects

added apcluster() method for sparse similarity matrices;
as a consequence, the package now imports the 'Matrix' package
and is now also able to handle non-sparse matrix classes
defined by the 'Matrix' package. Moreover, similarity functions
supplied to the apcluster() method may now also return any
matrix type defined by the 'Matrix' package.

fix of apcluster() for dense matrices to better support -Inf
similarities

added apclusterK() method for sparse similarity matrices

preferenceRange() is now an S4 generic; re-implementation in
C++ to speed up function; changed handling of -Inf similarities
for consistency with sparse version

plotting of clustering results extended to data sets with more than two dimensions (resulting in the clustering result being superimposed in a scatterplot matrix); the variant that plot() can be used to draw a heatmap has been removed. From now on, heatmap() must always be used.

re-implementation of heatmap() method: dendrograms can now be plotted even for APResult and ExClust objects as well as for cluster hierarchies based on prior clusterings; color bars can now be switched off and colors can be changed by user (by new 'sideColor' argument); dendrograms can be switched on and off (by 'Rowv' and 'Colv' arguments);

added as.hclust() and as.dendrogram() methods

added new arguments 'base', 'showSamples', and 'horiz' to the plot() method with signature (x="AggExResult", y="missing"); moreover, parameters for changing the appearance of the height axis are now respected as well