fmcquillan99 edited a comment on issue #433: Kmeans: Add automatic optimal cluster estimation URL: https://github.com/apache/madlib/pull/433#issuecomment-530576211 From https://scikit-learn.org/stable/auto_examples/cluster/plot_kmeans_silhouette_analysis.html the published results and the ones I get too are: ``` Automatically created module for IPython interactive environment ('For n_clusters =', 2, 'The average silhouette_score is :', 0.7049787496083262) ('For n_clusters =', 3, 'The average silhouette_score is :', 0.5882004012129721) ('For n_clusters =', 4, 'The average silhouette_score is :', 0.6505186632729437) ('For n_clusters =', 5, 'The average silhouette_score is :', 0.5637646902619401) ('For n_clusters =', 6, 'The average silhouette_score is :', 0.4504666294372765) ``` When I run this example with the code in this PR, the cluster centers seem to be in exactly the same place for k=1,2,3,4 (diff centroids for k=5,6) but I get diff silh values: ``` k | silhouette ---+------------------- 2 | 0.779349458639269 3 | 0.686510525829679 4 | 0.744861910083039 ``` diff chart: ``` k python/scikit-learn madlib delta %diff 2 0.7049787496 0.7793494586 0.07437070903 9.54% 3 0.5882004012 0.6865105258 0.09831012462 14.32% 4 0.6505186633 0.7448619101 0.09434324681 12.67% ``` Both are using Euclidean distance. Any idea what could account for the difference?
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
