Github user rnowling commented on a diff in the pull request:
https://github.com/apache/spark/pull/4087#discussion_r23142812
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/classification/NaiveBayes.scala ---
@@ -75,9 +106,12 @@ class NaiveBayesModel private[mllib] (
* document classification. By making every vector a 0-1 vector, it can
also be used as
* Bernoulli NB ([[http://tinyurl.com/p7c96j6]]). The input feature values
must be nonnegative.
*/
-class NaiveBayes private (private var lambda: Double) extends Serializable
with Logging {
+class NaiveBayes private (private var lambda: Double,
+ var model: NaiveBayesModels) extends
Serializable with Logging {
- def this() = this(1.0)
+ def this(lambda: Double) = this(lambda, NaiveBayesModels.Multinomial)
+
+ def this() = this(1.0, NaiveBayesModels.Multinomial)
--- End diff --
I suggest removing the default model for the internal API. Backwards
compatibility only matters for public API.
---
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]