Affinity Propagation — exemplars elected by messages
Affinity Propagation passes two messages between every pair of rows: responsibility (how well-suited one row is to be the other's exemplar) and availability (how available that candidate is, given everyone else who wants it). The rows that emerge as exemplars are the centers, and k is however many survive. Preference sets the prior that a row should be an exemplar; a shared median preference is the usual start.
Damping 0.7 on scaled Iris elected 9 exemplars, silhouette 0.314, adjusted Rand 0.298 against the 3 species. The algorithm did what it was asked: it found many local representatives, not the three species. On the customer table it elected 8 exemplars. If you needed a fixed k, this is the wrong tool; if you needed a short list of real prototype rows, the exemplar set is the deliverable.
Damping below about 0.5 lets the messages oscillate and the exemplar set flickers between iterations. Keep damping at 0.7 or higher when the run fails to settle.
Settings that change this fit
- damping
- Fraction of the previous message kept at each iteration. Higher damping converges more slowly and more reliably.
- preference
- How strongly each row wants to be an exemplar. More negative preferences produce fewer exemplars.