0

I am doing a clustering based on cosine similarity of many string sentences. for example the cosine similarity of string a & string b is close to string c & string b. The clustering method will group them together in a list form but the values that are being group is the two cosine values.

I wish to display the actual string themselves in their grouping. But my clustering method only takes in cosine similarity values. Any way to convert them back to their initial string?

MyClusters = HierarchicalClustering(List_of_cosine_values, lambda x,y: abs(x-y))
grouping = MyClusters.getlevel(0.018)
nu11p01n73R
  • 26,397
  • 3
  • 39
  • 52
  • 1
    Are you using a library? If not, what does your cosine similarity classes look like? You need a reverse mapping - which means saving the string with the similarity and not just the similarity, currently it seems like you don't have one. – Reut Sharabani Dec 30 '14 at 09:23
  • 1
    How to know what properties and methods `HierarchicalClustering` has? Usually you'd map your results back by using indices. – embert Dec 30 '14 at 09:24

0 Answers0