Repository: spark
Updated Branches:
  refs/heads/master ba181c0c7 -> 007882c7e


[SPARK-15189][PYSPARK][DOCS] Update ml.evaluation PyDoc

## What changes were proposed in this pull request?

Fix doctest issue, short param description, and tag items as Experimental

## How was this patch tested?

build docs locally & doctests

Author: Holden Karau <[email protected]>

Closes #12964 from holdenk/SPARK-15189-ml.Evaluation-PyDoc-issues.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/007882c7
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/007882c7
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/007882c7

Branch: refs/heads/master
Commit: 007882c7ee06de37ba309424fced1e4c6b408572
Parents: ba181c0
Author: Holden Karau <[email protected]>
Authored: Wed May 11 08:33:29 2016 +0200
Committer: Nick Pentreath <[email protected]>
Committed: Wed May 11 08:33:29 2016 +0200

----------------------------------------------------------------------
 python/pyspark/ml/evaluation.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/007882c7/python/pyspark/ml/evaluation.py
----------------------------------------------------------------------
diff --git a/python/pyspark/ml/evaluation.py b/python/pyspark/ml/evaluation.py
index 2a41678..719c0c7 100644
--- a/python/pyspark/ml/evaluation.py
+++ b/python/pyspark/ml/evaluation.py
@@ -105,6 +105,8 @@ class JavaEvaluator(JavaParams, Evaluator):
 @inherit_doc
 class BinaryClassificationEvaluator(JavaEvaluator, HasLabelCol, 
HasRawPredictionCol):
     """
+    .. note:: Experimental
+
     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).
@@ -172,6 +174,8 @@ class BinaryClassificationEvaluator(JavaEvaluator, 
HasLabelCol, HasRawPrediction
 @inherit_doc
 class RegressionEvaluator(JavaEvaluator, HasLabelCol, HasPredictionCol):
     """
+    .. note:: Experimental
+
     Evaluator for Regression, which expects two input
     columns: prediction and label.
 
@@ -193,7 +197,11 @@ class RegressionEvaluator(JavaEvaluator, HasLabelCol, 
HasPredictionCol):
     # when we evaluate a metric that is needed to minimize (e.g., `"rmse"`, 
`"mse"`, `"mae"`),
     # we take and output the negative of this metric.
     metricName = Param(Params._dummy(), "metricName",
-                       "metric name in evaluation (mse|rmse|r2|mae)",
+                       """metric name in evaluation - one of:
+                       rmse - root mean squared error (default)
+                       mse - mean squared error
+                       r2 - r^2 metric
+                       mae - mean absolute error.""",
                        typeConverter=TypeConverters.toString)
 
     @keyword_only
@@ -241,8 +249,11 @@ class RegressionEvaluator(JavaEvaluator, HasLabelCol, 
HasPredictionCol):
 @inherit_doc
 class MulticlassClassificationEvaluator(JavaEvaluator, HasLabelCol, 
HasPredictionCol):
     """
+    .. note:: Experimental
+
     Evaluator for Multiclass Classification, which expects two input
     columns: prediction and label.
+
     >>> scoreAndLabels = [(0.0, 0.0), (0.0, 1.0), (0.0, 0.0),
     ...     (1.0, 0.0), (1.0, 1.0), (1.0, 1.0), (1.0, 1.0), (2.0, 2.0), (2.0, 
0.0)]
     >>> dataset = sqlContext.createDataFrame(scoreAndLabels, ["prediction", 
"label"])


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to