add affinity propagation algorithm