GitHub user mgaido91 opened a pull request: https://github.com/apache/spark/pull/18538
[SPARK-14516][ML] Adding ClusteringEvaluator with the implementation of Cosine silhouette and squared Euclidean silhouette. ## What changes were proposed in this pull request? This PR adds the ClusteringEvaluator Evaluator which contains two metrics: - **cosineSilhouette**: the Silhouette measure using the cosine distance; - **squaredSilhouette**: the Silhouette measure using the squared Euclidean distance. The implementation of the two metrics refers to the algorithm proposed and explained [here](https://drive.google.com/file/d/0B0Hyo%5f%5fbG%5f3fdkNvSVNYX2E3ZU0/view). These algorithms have been thought for a distributed and parallel environment, thus they have reasonable performance, unlike a naive Silhouette implementation following its definition. ## How was this patch tested? The patch has been tested with the additional unit tests added (comparing the results with the ones provided by [Python sklearn library](http://scikit-learn.org/stable/modules/generated/sklearn.metrics.silhouette_score.html)). You can merge this pull request into a Git repository by running: $ git pull https://github.com/mgaido91/spark SPARK-14516 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/18538.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #18538 ---- commit 64e17b4db825f85ee19d30ca38cba887633c6900 Author: Marco Gaido <mga...@hortonworks.com> Date: 2017-06-30T15:05:17Z [SPARK-14516] Adding ClusteringEvaluator with the implementation of Cosine silhouette and squared Euclidean silhouette. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org