Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/8564#discussion_r41069606
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/regression/LinearRegression.scala ---
@@ -267,9 +277,19 @@ class LinearRegression(override val uid: String)
if (handlePersistence) instances.unpersist()
val model = copyValues(new LinearRegressionModel(uid, weights,
intercept))
+ // Handle possible missing or invalid prediction columns
+ val predictionColOpt =
get(predictionCol).orElse(getDefault(predictionCol)).filter(_ != "")
--- End diff --
This code at the end of learning is getting complex enough that it would
probably be worthwhile to create a helper method to avoid code duplication.
Would you mind doing that? It'd be nice if it could cover evaluate() as well,
to share code across these 3 places.
---
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]