Skip to content

Instantly share code, notes, and snippets.

@taroyabuki
Last active December 12, 2015 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taroyabuki/4749496 to your computer and use it in GitHub Desktop.
Save taroyabuki/4749496 to your computer and use it in GitHub Desktop.
Bug in FindClusters of Mathematica 8.0.4, 9.0.0, and 9.0.1.
data = Import["https://gist.github.com/taroyabuki/4749183/raw/ffc84dbc4a3499ddef4a8c4f689b56c2948225bd/clustering_test_data.csv"];
(* This returns no result *)
FindClusters[data, DistanceFunction -> CosineDistance,
Method -> {"Agglomerate", "Linkage" -> "Complete"}]
(* Shuffled data can be clustered. *)
FindClusters[RandomSample@data, DistanceFunction -> CosineDistance,
Method -> {"Agglomerate", "Linkage" -> "Complete"}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment