Github user badriub commented on a diff in the pull request:
https://github.com/apache/spark/pull/7652#discussion_r36916725
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/classification/OneVsRest.scala ---
@@ -127,10 +128,16 @@ final class OneVsRestModel private[ml] (
predictions.maxBy(_._2)._1.toDouble
}
+ // output the index of the classifier with highest confidence as
prediction
+ val probabilityUDF = udf { (predictions: Map[Int, Double]) =>
--- End diff --
Sorry for the delayed response. I've made some small changes as per your
recommendations. WRT this point, I'm not sure I follow. As far as I understand,
I need to return the highest confidence factor(which will be Double)
corresponding to the model used with OVR.
---
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]