<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Affinity Propagation · Clustering.jl</title><meta name="title" content="Affinity Propagation · Clustering.jl"/><meta property="og:title" content="Affinity Propagation · Clustering.jl"/><meta property="twitter:title" content="Affinity Propagation · Clustering.jl"/><meta name="description" content="Documentation for Clustering.jl."/><meta property="og:description" content="Documentation for Clustering.jl."/><meta property="twitter:description" content="Documentation for Clustering.jl."/><script data-outdated-warner src="assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="search_index.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/catppuccin-mocha.css" data-theme-name="catppuccin-mocha"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/catppuccin-macchiato.css" data-theme-name="catppuccin-macchiato"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/catppuccin-frappe.css" data-theme-name="catppuccin-frappe"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/catppuccin-latte.css" data-theme-name="catppuccin-latte"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="index.html"><img src="assets/logo.png" alt="Clustering.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="index.html">Clustering.jl</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="index.html">Introduction</a></li><li><span class="tocitem">Algorithms</span><ul><li><a class="tocitem" href="algorithms.html">Basics</a></li><li><a class="tocitem" href="init.html">Initialization</a></li><li><a class="tocitem" href="kmeans.html">K-means</a></li><li><a class="tocitem" href="kmedoids.html">K-medoids</a></li><li><a class="tocitem" href="hclust.html">Hierarchical Clustering</a></li><li><a class="tocitem" href="mcl.html">MCL (Markov Cluster Algorithm)</a></li><li class="is-active"><a class="tocitem" href="affprop.html">Affinity Propagation</a></li><li><a class="tocitem" href="dbscan.html">DBSCAN</a></li><li><a class="tocitem" href="fuzzycmeans.html">Fuzzy C-means</a></li></ul></li><li><a class="tocitem" href="validate.html">Evaluation & Validation</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Algorithms</a></li><li class="is-active"><a href="affprop.html">Affinity Propagation</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="affprop.html">Affinity Propagation</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/JuliaStats/Clustering.jl" title="View the repository on GitHub"><span class="docs-icon fa-brands"></span><span class="docs-label is-hidden-touch">GitHub</span></a><a class="docs-navbar-link" href="https://github.com/JuliaStats/Clustering.jl/blob/master/docs/source/affprop.md" title="Edit source on GitHub"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="Affinity-Propagation"><a class="docs-heading-anchor" href="#Affinity-Propagation">Affinity Propagation</a><a id="Affinity-Propagation-1"></a><a class="docs-heading-anchor-permalink" href="#Affinity-Propagation" title="Permalink"></a></h1><p><a href="http://en.wikipedia.org/wiki/Affinity_propagation">Affinity propagation</a> is a clustering algorithm based on <em>message passing</em> between data points. Similar to <a href="kmedoids.html#K-medoids">K-medoids</a>, it looks at the (dis)similarities in the data, picks one <em>exemplar</em> data point for each cluster, and assigns every point in the data set to the cluster with the closest <em>exemplar</em>.</p><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Clustering.affinityprop" href="#Clustering.affinityprop"><code>Clustering.affinityprop</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">affinityprop(S::AbstractMatrix; [maxiter=200], [tol=1e-6], [damp=0.5],
0 commit comments