Trying to use affinity propagation for a simple clustering task:
from sklearn.cluster import AffinityPropagation
c = [[0], [0], [0], [0], [0], [0], [0], [0]]
af = AffinityPropagation (affinity = 'euclidean').fit (c)
print (af.labels_)
I get this strange result: [0 1 0 1 2 1 1 0]
I would expect to have all samples in the same cluster, like in this case:
c = [[0], [0], [0]]
af = AffinityPropagation (affinity = 'euclidean').fit (c)
print (af.labels_)
which indeed puts all samples in the same cluster: [0 0 0]
What am I missing?
Thanks