Affinity Propagation
   HOME

TheInfoList



OR:

In
statistics Statistics (from German language, German: ', "description of a State (polity), state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a s ...
and
data mining Data mining is the process of extracting and finding patterns in massive data sets involving methods at the intersection of machine learning, statistics, and database systems. Data mining is an interdisciplinary subfield of computer science and ...
, affinity propagation (AP) is a clustering algorithm based on the concept of "message passing" between data points. Unlike clustering algorithms such as -means or -medoids, affinity propagation does not require the number of clusters to be determined or estimated before running the algorithm. Similar to -medoids, affinity propagation finds "exemplars," members of the input set that are representative of clusters.


Algorithm

Let through be a set of data points, with no assumptions made about their internal structure, and let be a function that quantifies the similarity between any two points, such that
if and only if In logic and related fields such as mathematics and philosophy, "if and only if" (often shortened as "iff") is paraphrased by the biconditional, a logical connective between statements. The biconditional is true in two cases, where either bo ...
is more similar to than to . For this example, the negative squared distance of two data points was used i.e. for points and , The diagonal of (i.e. s(i,i)) is particularly important, as it represents the instance preference, meaning how likely a particular instance is to become an exemplar. When it is set to the same value for all inputs, it controls how many classes the algorithm produces. A value close to the minimum possible similarity produces fewer classes, while a value close to or larger than the maximum possible similarity produces many classes. It is typically initialized to the median similarity of all pairs of inputs. The algorithm proceeds by alternating between two message-passing steps, which update two matrices: * The "responsibility" matrix has values that quantify how well-suited is to serve as the exemplar for , relative to other candidate exemplars for . * The "availability" matrix contains values that represent how "appropriate" it would be for to pick as its exemplar, taking into account other points' preference for as an exemplar. Both matrices are initialized to all zeroes, and can be viewed as log-probability tables. The algorithm then performs the following updates iteratively: * First, responsibility updates are sent around: r(i,k) \gets s(i,k) - \max_ * Then, availability is updated per a(i,k) \gets \min \quad \text i \neq k and a(k,k) \leftarrow \sum_ \max(0, r(i',k)). Iterations are performed until either the cluster boundaries remain unchanged over a number of iterations, or some predetermined number (of iterations) is reached. The exemplars are extracted from the final matrices as those whose 'responsibility + availability' for themselves is positive (i.e. (r(i,i) + a(i,i)) > 0).


Applications

The inventors of affinity propagation showed it is better for certain computer vision and
computational biology Computational biology refers to the use of techniques in computer science, data analysis, mathematical modeling and Computer simulation, computational simulations to understand biological systems and relationships. An intersection of computer sci ...
tasks, e.g. clustering of pictures of human faces and identifying regulated transcripts, than -means, even when -means was allowed many random restarts and initialized using PCA. A study comparing affinity propagation and
Markov clustering In statistics, Markov chain Monte Carlo (MCMC) is a class of algorithms used to draw samples from a probability distribution. Given a probability distribution, one can construct a Markov chain whose elements' distribution approximates it – that ...
on protein interaction graph partitioning found Markov clustering to work better for that problem. A semi-supervised variant has been proposed for
text mining Text mining, text data mining (TDM) or text analytics is the process of deriving high-quality information from text. It involves "the discovery by computer of new, previously unknown information, by automatically extracting information from differe ...
applications. Another recent application was in economics, when the affinity propagation was used to find some temporal patterns in the output multipliers of the US economy between 1997 and 2017.


Software

* A
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
implementation is included in the
ELKI ELKI (''Environment for Developing KDD-Applications Supported by Index-Structures'') is a data mining (KDD, knowledge discovery in databases) software framework developed for use in research and teaching. It was originally created by the databa ...
data mining framework. * A Julia implementation of affinity propagation is contained in Julia Statistics's Clustering.jl package. * A Python version is part of the
scikit-learn scikit-learn (formerly scikits.learn and also known as sklearn) is a free and open-source machine learning library for the Python programming language. It features various classification, regression and clustering algorithms including support ...
library. * An R implementation is available in the "apcluster" package.


References

{{reflist Cluster analysis algorithms