0

In looking at the docs for sklearn.cluster and Affinity Propagation I don't see anything that would calculate error in a cluster. Does this exist or is this something I have to write on my own?

Update: Let me propose a possible idea:

With Affinity Propagation we have a dissimilarity matrix (that is a matrix that measures how dissimilar each row is from each other). When AP is finished I have all the label assignments to which cluster they belong. What if I took the dissimilarity measurement from the matrix? For example, say in an 10x10 matrix point 3 is my cluster and label 4 is assigned to the exemplar 3. The dissimilarity between the centroid and label is say -5, as an example. Let's say there are two more labels assigned to this centroid with a dissimilarity of -3 and -8 respectively. Now if I said the total error is -16/3. If I have another cluster with dissimilarity measurements of -2, -3, -2, -3, -2, -3 = -15/6. This seems to provide a potential error measurement.

DaveK
  • 544
  • 1
  • 6
  • 16

1 Answers1

0

I don't think there is a commonly accepted definition of "error" that would make sense in the context of affinity propagation, which is a similarity based method.

Errors work well with coordinate based methods such as k-means, but on AP we may not have coordinates.

Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194
  • No... AP doesn't work like "coordinates" unless you have all numeric data. But since most DBs have mixed data: numeric, and categorical, there is a lot more that has to be done to get that similarity matrix. I am currently using this proposal https://www.researchgate.net/publication/285803703_An_Affinity_Propagation_Clustering_Algorithm_for_Mixed_Numeric_and_Categorical_Datasets. I might not be able to use error then for adaptive purposes but switch to a new adaption proposal from the same source. – DaveK Feb 11 '19 at 18:26
  • Also I'm thinking that error "could" be measured by taking the similarity measurements between the exemplar and the assignment points and adding them together. From there I'm not sure how else to proceed. – DaveK Feb 11 '19 at 19:32