Github user sethah commented on a diff in the pull request:
https://github.com/apache/spark/pull/16407#discussion_r93883879
--- Diff:
mllib/src/test/scala/org/apache/spark/ml/classification/LogisticRegressionSuite.scala
---
@@ -359,8 +359,16 @@ class LogisticRegressionSuite
assert(pred == predFromProb)
}
- // force it to use probability2prediction
+ // force it to use raw2prediction
model.setProbabilityCol("")
+ val resultsUsingRaw2Predict =
+
model.transform(smallMultinomialDataset).select("prediction").as[Double].collect()
+
resultsUsingRaw2Predict.zip(results.select("prediction").as[Double].collect()).foreach
{
+ case (pred1, pred2) => assert(pred1 === pred2)
+ }
+
+ // force it to use probability2prediction
+ model.setRawPredictionCol("")
--- End diff --
this needs to be changed to
`model.setRawPredictionCol("").setProbabilityCol("probability")`, otherwise it
will use the `predict` udf here.
---
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]