You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by me...@apache.org on 2016/05/20 00:56:25 UTC
spark git commit: [MINOR][ML][PYSPARK] ml.evaluation Scala and Python
API sync
Repository: spark
Updated Branches:
refs/heads/master f8107c784 -> 664367781
[MINOR][ML][PYSPARK] ml.evaluation Scala and Python API sync
## What changes were proposed in this pull request?
```ml.evaluation``` Scala and Python API sync.
## How was this patch tested?
Only API docs change, no new tests.
Author: Yanbo Liang <yb...@gmail.com>
Closes #13195 from yanboliang/evaluation-doc.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/66436778
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/66436778
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/66436778
Branch: refs/heads/master
Commit: 664367781786df7ec52e39950dccd5a09681602c
Parents: f8107c7
Author: Yanbo Liang <yb...@gmail.com>
Authored: Thu May 19 17:56:21 2016 -0700
Committer: Xiangrui Meng <me...@databricks.com>
Committed: Thu May 19 17:56:21 2016 -0700
----------------------------------------------------------------------
.../spark/ml/evaluation/MulticlassClassificationEvaluator.scala | 2 +-
python/pyspark/ml/evaluation.py | 5 +----
2 files changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/66436778/mllib/src/main/scala/org/apache/spark/ml/evaluation/MulticlassClassificationEvaluator.scala
----------------------------------------------------------------------
diff --git a/mllib/src/main/scala/org/apache/spark/ml/evaluation/MulticlassClassificationEvaluator.scala b/mllib/src/main/scala/org/apache/spark/ml/evaluation/MulticlassClassificationEvaluator.scala
index 8408516..390e9b6 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/evaluation/MulticlassClassificationEvaluator.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/evaluation/MulticlassClassificationEvaluator.scala
@@ -28,7 +28,7 @@ import org.apache.spark.sql.types.DoubleType
/**
* :: Experimental ::
- * Evaluator for multiclass classification, which expects two input columns: score and label.
+ * Evaluator for multiclass classification, which expects two input columns: prediction and label.
*/
@Since("1.5.0")
@Experimental
http://git-wip-us.apache.org/repos/asf/spark/blob/66436778/python/pyspark/ml/evaluation.py
----------------------------------------------------------------------
diff --git a/python/pyspark/ml/evaluation.py b/python/pyspark/ml/evaluation.py
index fc9099b..16029dc 100644
--- a/python/pyspark/ml/evaluation.py
+++ b/python/pyspark/ml/evaluation.py
@@ -193,9 +193,6 @@ class RegressionEvaluator(JavaEvaluator, HasLabelCol, HasPredictionCol):
.. versionadded:: 1.4.0
"""
- # Because we will maximize evaluation value (ref: `CrossValidator`),
- # 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 - one of:
rmse - root mean squared error (default)
@@ -270,7 +267,7 @@ class MulticlassClassificationEvaluator(JavaEvaluator, HasLabelCol, HasPredictio
"""
metricName = Param(Params._dummy(), "metricName",
"metric name in evaluation "
- "(f1|precision|recall|weightedPrecision|weightedRecall)",
+ "(f1|precision|recall|weightedPrecision|weightedRecall|accuracy)",
typeConverter=TypeConverters.toString)
@keyword_only
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org