Skip to content

Instantly share code, notes, and snippets.

@Zhomart
Last active August 29, 2015 14:07
Show Gist options
  • Save Zhomart/498c13de88420793f890 to your computer and use it in GitHub Desktop.
Save Zhomart/498c13de88420793f890 to your computer and use it in GitHub Desktop.
Example 2

Pairs with distances

bikini, drinking -> 99.77
coughed, drinking -> 99.98
coughed, bikini -> 100.0
had, drinking -> 80.09
had, bikini -> 97.32
had, coughed -> 99.84
mess, drinking -> 98.84
mess, bikini -> 99.8
mess, coughed -> 99.99
mess, had -> 88.83
nose, drinking -> 98.51
nose, bikini -> 99.78
nose, coughed -> 99.97
nose, had -> 82.09
nose, mess -> 99.03
beer, drinking -> 96.37
beer, bikini -> 99.8
beer, coughed -> 99.99
beer, had -> 83.72
beer, mess -> 99.22
beer, nose -> 99.03

Distance Matrix

0:
1: 99
2: 99 99
3: 80 97 99
4: 98 99 99 88
5: 98 99 99 82 99
6: 96 99 99 83 99 99

Words

["drinking", "bikini", "coughed", "had", "mess", "nose", "beer"]

Clusters

[ <clusters>, <error>, <number of iterations> ]

[[3, 1, 2, 3, 3, 3, 3], 334.7387459852529, 12]
[[3, 1, 2, 3, 3, 3, 3], 334.7387459852529, 13]
[[3, 1, 2, 3, 3, 3, 3], 334.7387459852529, 18]
[[3, 1, 2, 3, 3, 3, 3], 334.7387459852529, 17]
[[3, 1, 2, 3, 3, 3, 3], 334.7387459852529, 7]
[[3, 1, 2, 3, 3, 3, 3], 334.7387459852529, 12]

clustered words

[["drinking", "had", "mess", "nose", "beer"], ["coughed"], ["bikini"]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment