Skip to content

Commit 2d0c1ba

Browse files
committed
fixed typo in NaiveBayes
1 parent c298e78 commit 2d0c1ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class NaiveBayesModel private[mllib] (
6262
case NaiveBayes.Multinomial => (None, None)
6363
case NaiveBayes.Bernoulli =>
6464
val negTheta = brzLog((brzExp(brzTheta.copy) :*= (-1.0)) :+= 1.0) // log(1.0 - exp(x))
65-
(Option(negTheta), Option(brzSum(brzNegTheta, Axis._1)))
65+
(Option(negTheta), Option(brzSum(negTheta, Axis._1)))
6666
}
6767

6868
override def predict(testData: RDD[Vector]): RDD[Double] = {

0 commit comments

Comments
 (0)