Skip to content
Snippets Groups Projects
Commit f82ebb15 authored by BenFradet's avatar BenFradet Committed by Joseph K. Bradley
Browse files

[SPARK-12368][ML][DOC] Better doc for the binary classification evaluator' metricName

For the BinaryClassificationEvaluator, the scaladoc doesn't mention that "areaUnderPR" is supported, only that the default is "areadUnderROC".
Also, in the documentation, it is said that:
"The default metric used to choose the best ParamMap can be overriden by the setMetric method in each of these evaluators."
However, the method is called setMetricName.

This PR aims to fix both issues.

Author: BenFradet <benjamin.fradet@gmail.com>

Closes #10328 from BenFradet/SPARK-12368.
parent fcd013cf
No related branches found
No related tags found
No related merge requests found
......@@ -628,7 +628,7 @@ Currently, `spark.ml` supports model selection using the [`CrossValidator`](api/
The `Evaluator` can be a [`RegressionEvaluator`](api/scala/index.html#org.apache.spark.ml.evaluation.RegressionEvaluator)
for regression problems, a [`BinaryClassificationEvaluator`](api/scala/index.html#org.apache.spark.ml.evaluation.BinaryClassificationEvaluator)
for binary data, or a [`MultiClassClassificationEvaluator`](api/scala/index.html#org.apache.spark.ml.evaluation.MultiClassClassificationEvaluator)
for multiclass problems. The default metric used to choose the best `ParamMap` can be overriden by the `setMetric`
for multiclass problems. The default metric used to choose the best `ParamMap` can be overriden by the `setMetricName`
method in each of these evaluators.
The `ParamMap` which produces the best evaluation metric (averaged over the `$k$` folds) is selected as the best model.
......@@ -951,4 +951,4 @@ model.transform(test)
{% endhighlight %}
</div>
</div>
\ No newline at end of file
</div>
......@@ -39,8 +39,7 @@ class BinaryClassificationEvaluator @Since("1.4.0") (@Since("1.4.0") override va
def this() = this(Identifiable.randomUID("binEval"))
/**
* param for metric name in evaluation
* Default: areaUnderROC
* param for metric name in evaluation (supports `"areaUnderROC"` (default), `"areaUnderPR"`)
* @group param
*/
@Since("1.2.0")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment