Github user sethah commented on a diff in the pull request:
https://github.com/apache/spark/pull/12577#discussion_r60662187
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/evaluation/RegressionEvaluator.scala
---
@@ -69,7 +69,27 @@ final class RegressionEvaluator @Since("1.4.0")
(@Since("1.4.0") override val ui
@Since("1.4.0")
def setLabelCol(value: String): this.type = set(labelCol, value)
- setDefault(metricName -> "rmse")
+ /**
+ * Param for whether to drop rows where 'predictionCol' is NaN. NOTE -
only set this to
+ * true if you are certain that NaN predictions should be ignored!
+ * (default: false)
+ *
+ * @group expertParam
+ */
+ @Since("2.0.0")
+ val dropNaN: BooleanParam = new BooleanParam(this, "dropNaN",
--- End diff --
Making this a Boolean parameter called `dropNaN` makes it less extensible
in the future if we wish to implement more than just one possible NaN behavior.
If we don't envision adding any other behavior then I guess this is good, but
otherwise we could make a String param and limit its options to drop or raise
an error for now.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]