Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/16441#discussion_r96708064
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/tree/loss/LogLoss.scala ---
@@ -52,4 +51,10 @@ object LogLoss extends Loss {
// The following is equivalent to 2.0 * log(1 + exp(-margin)) but more
numerically stable.
2.0 * MLUtils.log1pExp(-margin)
}
+
+ override private[spark] def computeProbability(prediction: Double):
Double = {
+ // The probability can be calculated as:
--- End diff --
This doc is just repeating the code line below it. Instead, how about
documenting in Scala doc for this method that it returns the estimated
probability of a label of 1.0?
also, rename prediction -> rawPrediction
---
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]