Github user srowen commented on a diff in the pull request: https://github.com/apache/spark/pull/22058#discussion_r209027132 --- Diff: mllib/src/main/scala/org/apache/spark/ml/evaluation/ClusteringEvaluator.scala --- @@ -119,6 +119,8 @@ class ClusteringEvaluator @Since("2.3.0") (@Since("2.3.0") override val uid: Str df, $(predictionCol), $(featuresCol)) case ("silhouette", "cosine") => CosineSilhouette.computeSilhouetteScore(df, $(predictionCol), $(featuresCol)) + case (mn, dm) => + throw new IllegalArgumentException(s"($mn, $dm) is not matched in evaluate") --- End diff -- This is OK, but doesn't really add much beyond what the MatchError would have said. Worth a message like "No support for metric $mn, distance $dm"?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org