Github user yanboliang commented on a diff in the pull request:
https://github.com/apache/spark/pull/19204#discussion_r139718610
--- Diff: python/pyspark/ml/evaluation.py ---
@@ -328,6 +329,77 @@ def setParams(self, predictionCol="prediction",
labelCol="label",
kwargs = self._input_kwargs
return self._set(**kwargs)
+
+@inherit_doc
+class ClusteringEvaluator(JavaEvaluator, HasPredictionCol, HasFeaturesCol,
+ JavaMLReadable, JavaMLWritable):
+ """
+ .. note:: Experimental
+
+ Evaluator for Clustering results, which expects two input
+ columns: prediction and features.
+
+ >>> from pyspark.ml.linalg import Vectors
+ >>> scoreAndLabels = map(lambda x: (Vectors.dense(x[0]), x[1]),
--- End diff --
```scoreAndLabels``` -> ```featureAndPredictions```, the dataset here is
different from other evaluators, we should use more accurate name. Thanks.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]