We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a3676d commit 0313c0cCopy full SHA for 0313c0c
mllib/src/main/scala/org/apache/spark/mllib/classification/NaiveBayes.scala
@@ -59,8 +59,7 @@ class NaiveBayesModel private[mllib] (
59
private val brzNegTheta: Option[BDM[Double]] = model match {
60
case NaiveBayesModels.Multinomial => None
61
case NaiveBayesModels.Bernoulli =>
62
- val negTheta = brzLog((brzExp(brzTheta.copy) :*= (-1.0)) :+= 1.0)
63
- //((x) => math.log(1.0 - math.exp(x))
+ val negTheta = brzLog((brzExp(brzTheta.copy) :*= (-1.0)) :+= 1.0) // log(1.0 - exp(x))
64
Option(negTheta)
65
}
66
0 commit comments