Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"?

}
}
}
Expand Down