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

    https://github.com/apache/spark/pull/12819#discussion_r78325579
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/classification/NaiveBayes.scala ---
    @@ -98,7 +99,17 @@ class NaiveBayes @Since("1.5.0") (
        */
       @Since("1.5.0")
       def setModelType(value: String): this.type = set(modelType, value)
    -  setDefault(modelType -> OldNaiveBayes.Multinomial)
    +  setDefault(modelType -> NaiveBayes.Multinomial)
    +
    +  /**
    +   * Whether to over-/under-sample training instances according to the 
given weights in weightCol.
    +   * If empty, all instances are treated equally (weight 1.0).
    +   * Default is empty, so all instances have weight one.
    +   * @group setParam
    +   */
    +  @Since("2.1.0")
    +  def setWeightCol(value: String): this.type = set(weightCol, value)
    +  setDefault(weightCol -> "")
    --- End diff --
    
    It's not necessary to set default for ```weightCol```. You can refer other 
place where used ```weightCol```.


---
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]

Reply via email to