Skip to content

Commit 6643677

Browse files
yanboliangmengxr
authored andcommitted
[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 <[email protected]> Closes #13195 from yanboliang/evaluation-doc.
1 parent f8107c7 commit 6643677

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

mllib/src/main/scala/org/apache/spark/ml/evaluation/MulticlassClassificationEvaluator.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import org.apache.spark.sql.types.DoubleType
2828

2929
/**
3030
* :: Experimental ::
31-
* Evaluator for multiclass classification, which expects two input columns: score and label.
31+
* Evaluator for multiclass classification, which expects two input columns: prediction and label.
3232
*/
3333
@Since("1.5.0")
3434
@Experimental

python/pyspark/ml/evaluation.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,6 @@ class RegressionEvaluator(JavaEvaluator, HasLabelCol, HasPredictionCol):
193193
194194
.. versionadded:: 1.4.0
195195
"""
196-
# Because we will maximize evaluation value (ref: `CrossValidator`),
197-
# when we evaluate a metric that is needed to minimize (e.g., `"rmse"`, `"mse"`, `"mae"`),
198-
# we take and output the negative of this metric.
199196
metricName = Param(Params._dummy(), "metricName",
200197
"""metric name in evaluation - one of:
201198
rmse - root mean squared error (default)
@@ -270,7 +267,7 @@ class MulticlassClassificationEvaluator(JavaEvaluator, HasLabelCol, HasPredictio
270267
"""
271268
metricName = Param(Params._dummy(), "metricName",
272269
"metric name in evaluation "
273-
"(f1|precision|recall|weightedPrecision|weightedRecall)",
270+
"(f1|precision|recall|weightedPrecision|weightedRecall|accuracy)",
274271
typeConverter=TypeConverters.toString)
275272

276273
@keyword_only

0 commit comments

Comments
 (0)