You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//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
privateval (brzNegTheta, brzNegThetaSum) = modelType match {
62
62
caseNaiveBayes.Multinomial=> (None, None)
63
63
caseNaiveBayes.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
* @paraminput RDD of `(label, array of features)` pairs. Every vector should be a frequency
0 commit comments