AP Clustering algorithm is a kind of clustering algorithm based on "information transfer" between data points. Unlike the K- means algorithm or the k -centric point algorithm,theAP algorithm does not need to determine the number of clusters before running the algorithm. the "examplars" that the AP algorithm looksforis the cluster center point, which is the actual point in the data set as a representation of each class.
Algorithm Description:
Assumptions $\{{x_1},{x_2}, \cdots, {x_n}\} $ Data Sample Set, there is no intrinsic structure between data assumptions. The order is a matrix that depicts the similarity between points, making $s (i,j) > S (i,k) $ when and only if $x _i$ and $x _j$ The similarity between the _k$ and the $x is greater than the similarity between them .
AP The algorithm alternates two message passing steps to update two matrices:
- attraction information ( Responsibility ) matrix R $r (i,k) $ K I I K
- Attribution Information ( availability) matrix a:$a (i,k) $ describes the data object I Select a Data Object k As a basis for its suitability as a cluster center, it represents the k to the I the message.
two matrices R , All of a is initialized to 0. can be seen as Log - probability table. This algorithm is iterated through the following steps:
- First, attract information ( Responsibility)${r_{t + 1}} (i,k) $ per
${r_{t + 1}} (I,k) = S (i,k)-\mathop {\max}\limits_{k ' \ne k} \{{a_t} (i,k ') + S (i,k ') \} $
Iterations.
- then, the attribution information ( availability)${a_{t + 1}} (i,k) $ per
\[{a_{t + 1}} (I,k) = \mathop {\min}\limits_{} \left ({0,{r_t} (k,k) + \sum\limits_{i ' \notin \{i,k\}} {\max \{0,{r_t} (i ', k) \}}} \right), I \ne K\]
And
\[{a_t} (k,k) = \sum\limits_{i ' \ne k} {\max \{0,{r_t} (i ', k) \}} \]
Iterations.
- Iterating over the above steps, the algorithm ends if the decisions remain constant after several iterations or if the algorithm executes more than the set iteration number, or if the decision about the sample point in a small area remains unchanged after several iterations.
ap algorithm updates the information, the attenuation factor $\lambda $ $\lambda $ 1-$\lambda $ times. wherein, the attenuation factor $\lambda $ is between 0 the real number between and 1 . $a (i,k) $ iteration value:
\[{r_{t + 1}} (I,k) \leftarrow (1-\lambda) {r_{t + 1}} (I,k) + \lambda {r_t} (i,k) \]
\[{a_{t + 1}} (I,k) \leftarrow (1-\lambda) {a_{t + 1}} (I,k) + \lambda {a_t} (i,k) \]
AP Clustering Algorithm (Affinity propagation Clustering algorithm)