@@ -55,9 +55,9 @@ class NaiveBayesModel private[mllib] (
55
55
private val brzPi = new BDV [Double ](pi)
56
56
private val brzTheta = new BDM (theta(0 ).length, theta.length, theta.flatten).t
57
57
58
- // Bernoulli scoring requires log(condprob) if 1 log(1-condprob) if 0
59
- // this precomputes log(1.0 - exp(theta)) and its sum for linear algebra application
60
- // of this condition in predict function
58
+ // Bernoulli scoring requires log(condprob) if 1 log(1-condprob) if 0
59
+ // this precomputes log(1.0 - exp(theta)) and its sum for linear algebra application
60
+ // of this condition in predict function
61
61
private val (brzNegTheta, brzNegThetaSum) = modelType match {
62
62
case NaiveBayes .Multinomial => (None , None )
63
63
case NaiveBayes .Bernoulli =>
@@ -276,9 +276,9 @@ object NaiveBayes {
276
276
/**
277
277
* Trains a Naive Bayes model given an RDD of `(label, features)` pairs.
278
278
*
279
- * This is the default Multinomial NB ([[http://tinyurl.com/lsdw6p ]]) which can handle all kinds of
280
- * discrete data. For example, by converting documents into TF-IDF vectors, it can be used for
281
- * document classification.
279
+ * This is the default Multinomial NB ([[http://tinyurl.com/lsdw6p ]]) which can handle all
280
+ * kinds of discrete data. For example, by converting documents into TF-IDF vectors, it
281
+ * can be used for document classification.
282
282
*
283
283
* This version of the method uses a default smoothing parameter of 1.0.
284
284
*
@@ -292,9 +292,9 @@ object NaiveBayes {
292
292
/**
293
293
* Trains a Naive Bayes model given an RDD of `(label, features)` pairs.
294
294
*
295
- * This is the default Multinomial NB ([[http://tinyurl.com/lsdw6p ]]) which can handle all kinds of
296
- * discrete data. For example, by converting documents into TF-IDF vectors, it can be used for
297
- * document classification.
295
+ * This is the default Multinomial NB ([[http://tinyurl.com/lsdw6p ]]) which can handle all
296
+ * kinds of discrete data. For example, by converting documents into TF-IDF vectors, it
297
+ * can be used for document classification.
298
298
*
299
299
* @param input RDD of `(label, array of features)` pairs. Every vector should be a frequency
300
300
* vector or a count vector.
0 commit comments