Skip to content

Commit

Permalink
fixed typo in NaiveBayes
Browse files Browse the repository at this point in the history
  • Loading branch information
leahmcguire committed Mar 5, 2015
1 parent c298e78 commit 2d0c1ba
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {
Expand Down

0 comments on commit 2d0c1ba

Please sign in to comment.