Github user MLnick commented on a diff in the pull request:
https://github.com/apache/spark/pull/12577#discussion_r60705650
--- 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 --
Currently if `nulls` are present `RegressionEvaluator` throws a
`MatchError`. I think we should either (a) disallow nullable columns explicitly
with a schema check in `evaluate` - this can then provide a more understandable
error message too; (b) allow nulls, but ignore them for both prediction and
label col.
I think nulls in the input for this case are unlikely and probably a result
of bad data or user error somewhere along the line. So I'd prefer option (a).
This then means the `dropNaN` setting will only apply to NaNs.
---
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]