Skip to content

Commit 0313c0c

Browse files
committed
fixed style error in NaiveBayes.scala
1 parent 4a3676d commit 0313c0c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mllib/src/main/scala/org/apache/spark/mllib/classification/NaiveBayes.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ class NaiveBayesModel private[mllib] (
5959
private val brzNegTheta: Option[BDM[Double]] = model match {
6060
case NaiveBayesModels.Multinomial => None
6161
case NaiveBayesModels.Bernoulli =>
62-
val negTheta = brzLog((brzExp(brzTheta.copy) :*= (-1.0)) :+= 1.0)
63-
//((x) => math.log(1.0 - math.exp(x))
62+
val negTheta = brzLog((brzExp(brzTheta.copy) :*= (-1.0)) :+= 1.0) // log(1.0 - exp(x))
6463
Option(negTheta)
6564
}
6665

0 commit comments

Comments
 (0)