Github user rnowling commented on a diff in the pull request:
https://github.com/apache/spark/pull/4087#discussion_r23142533
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/classification/NaiveBayes.scala ---
@@ -32,28 +42,42 @@ import org.apache.spark.rdd.RDD
* @param pi log of class priors, whose dimension is C, number of labels
* @param theta log of class conditional probabilities, whose dimension is
C-by-D,
* where D is number of features
+ * @param model The type of NB model to fit from the enumeration
NaiveBayesModels, can be
+ * Multinomial or Bernoulli
*/
+
class NaiveBayesModel private[mllib] (
val labels: Array[Double],
val pi: Array[Double],
- val theta: Array[Array[Double]]) extends ClassificationModel with
Serializable {
-
- private val brzPi = new BDV[Double](pi)
- private val brzTheta = new BDM[Double](theta.length, theta(0).length)
+ val theta: Array[Array[Double]],
--- End diff --
This should probably be converted to a Breeze matrix.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]