Skip to content

Commit 6043fa8

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 cb7a90a commit 6043fa8

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
@@ -36,11 +36,12 @@ final class RegressionEvaluator(override val uid: String)
3636
def this() = this(Identifiable.randomUID("regEval"))
3737

3838
/**
39-
* param for metric name in evaluation (supports `"rmse"` (default), `"mse"`, `"r2"`, and `"mae"`)
39+
* Param for metric name in evaluation. Supports:
40+
* - `"rmse"` (default): root mean squared error
41+
* - `"mse"`: mean squared error
42+
* - `"r2"`: R^2^ metric
43+
* - `"mae"`: mean absolute error
4044
*
41-
* Because we will maximize evaluation value (ref: `CrossValidator`),
42-
* when we evaluate a metric that is needed to minimize (e.g., `"rmse"`, `"mse"`, `"mae"`),
43-
* we take and output the negative of this metric.
4445
* @group param
4546
*/
4647
val metricName: Param[String] = {

0 commit comments

Comments
 (0)