-
- Downloads
[SPARK-14077][ML][FOLLOW-UP] Minor refactor and cleanup for NaiveBayes
## What changes were proposed in this pull request? * Refactor out ```trainWithLabelCheck``` and make ```mllib.NaiveBayes``` call into it. * Avoid capturing the outer object for ```modelType```. * Move ```requireNonnegativeValues``` and ```requireZeroOneBernoulliValues``` to companion object. ## How was this patch tested? Existing tests. Author: Yanbo Liang <ybliang8@gmail.com> Closes #15826 from yanboliang/spark-14077-2. (cherry picked from commit 22cb3a06) Signed-off-by:Yanbo Liang <ybliang8@gmail.com>
Showing
- mllib/src/main/scala/org/apache/spark/ml/classification/NaiveBayes.scala 36 additions, 36 deletions...scala/org/apache/spark/ml/classification/NaiveBayes.scala
- mllib/src/main/scala/org/apache/spark/mllib/classification/NaiveBayes.scala 3 additions, 3 deletions...la/org/apache/spark/mllib/classification/NaiveBayes.scala
Please register or sign in to comment