Github user jkbradley commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4087#discussion_r25727343
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/classification/NaiveBayes.scala ---
    @@ -156,9 +191,12 @@ object NaiveBayesModel extends Loader[NaiveBayesModel] 
{
      * 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 modelType: NaiveBayesModels) extends 
Serializable with Logging {
    --- End diff --
    
    I'd recommend making the var private and providing a getModelType method.  
That limits the public API more so that it will be easier to change if we ever 
need to deprecate or modifyf the "NaiveBayesModels" type.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to