Last active
December 13, 2015 23:59
-
-
Save taroyabuki/4995604 to your computer and use it in GitHub Desktop.
Bug in Agglomerate of Mathematica 8.0.4 and 9.0.1.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Needs["HierarchicalClustering`"] | |
data = Import["https://gist.github.com/taroyabuki/4749183/raw/ffc84dbc4a3499ddef4a8c4f689b56c2948225bd/clustering_test_data.csv"]; | |
clusters = Agglomerate[data, DistanceFunction -> CosineDistance, Linkage -> "Complete"]; | |
On[Assert]; | |
Assert[Length@ClusterFlatten@clusters == Length@data] | |
{Length@ClusterFlatten@clusters, Length@data} | |
(* {38, 63} *) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment