Skip to content

Commit 93c9a63

Browse files
committed
[SPARK-14618][ML][DOC] Updated RegressionEvaluator.metricName param doc
## What changes were proposed in this pull request? In Spark 1.4, we negated some metrics from RegressionEvaluator since CrossValidator always maximized metrics. This was fixed in 1.5, but the docs were not updated. This PR updates the docs. ## How was this patch tested? no tests Author: Joseph K. Bradley <[email protected]> Closes #12377 from jkbradley/regeval-doc. (cherry picked from commit bf65c87) Signed-off-by: Joseph K. Bradley <[email protected]>
1 parent 413d060 commit 93c9a63

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ final class RegressionEvaluator @Since("1.4.0") (@Since("1.4.0") override val ui
3939
def this() = this(Identifiable.randomUID("regEval"))
4040

4141
/**
42-
* param for metric name in evaluation (supports `"rmse"` (default), `"mse"`, `"r2"`, and `"mae"`)
42+
* Param for metric name in evaluation. Supports:
43+
* - `"rmse"` (default): root mean squared error
44+
* - `"mse"`: mean squared error
45+
* - `"r2"`: R^2^ metric
46+
* - `"mae"`: mean absolute error
4347
*
44-
* Because we will maximize evaluation value (ref: `CrossValidator`),
45-
* when we evaluate a metric that is needed to minimize (e.g., `"rmse"`, `"mse"`, `"mae"`),
46-
* we take and output the negative of this metric.
4748
* @group param
4849
*/
4950
@Since("1.4.0")

0 commit comments

Comments
 (0)