aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/ml/evaluation.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/pyspark/ml/evaluation.py')
-rw-r--r--python/pyspark/ml/evaluation.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/pyspark/ml/evaluation.py b/python/pyspark/ml/evaluation.py
index dcc1738ec5..6ff68abd8f 100644
--- a/python/pyspark/ml/evaluation.py
+++ b/python/pyspark/ml/evaluation.py
@@ -106,8 +106,9 @@ class JavaEvaluator(Evaluator, JavaWrapper):
@inherit_doc
class BinaryClassificationEvaluator(JavaEvaluator, HasLabelCol, HasRawPredictionCol):
"""
- Evaluator for binary classification, which expects two input
- columns: rawPrediction and label.
+ Evaluator for binary classification, which expects two input columns: rawPrediction and label.
+ The rawPrediction column can be of type double (binary 0/1 prediction, or probability of label
+ 1) or of type vector (length-2 vector of raw predictions, scores, or label probabilities).
>>> from pyspark.mllib.linalg import Vectors
>>> scoreAndLabels = map(lambda x: (Vectors.dense([1.0 - x[0], x[0]]), x[1]),