From 2d0c1ba631841a0c55212fbc8dd7327285972ef8 Mon Sep 17 00:00:00 2001 From: leahmcguire Date: Thu, 5 Mar 2015 13:42:42 -0800 Subject: [PATCH] fixed typo in NaiveBayes --- .../org/apache/spark/mllib/classification/NaiveBayes.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mllib/src/main/scala/org/apache/spark/mllib/classification/NaiveBayes.scala b/mllib/src/main/scala/org/apache/spark/mllib/classification/NaiveBayes.scala index f6683051fad0e..a2bc8c9aa64ab 100644 --- a/mllib/src/main/scala/org/apache/spark/mllib/classification/NaiveBayes.scala +++ b/mllib/src/main/scala/org/apache/spark/mllib/classification/NaiveBayes.scala @@ -62,7 +62,7 @@ class NaiveBayesModel private[mllib] ( case NaiveBayes.Multinomial => (None, None) case NaiveBayes.Bernoulli => val negTheta = brzLog((brzExp(brzTheta.copy) :*= (-1.0)) :+= 1.0) // log(1.0 - exp(x)) - (Option(negTheta), Option(brzSum(brzNegTheta, Axis._1))) + (Option(negTheta), Option(brzSum(negTheta, Axis._1))) } override def predict(testData: RDD[Vector]): RDD[Double] = {