Skip to content

Commit 85be65b

Browse files
Feynman Liangjkbradley
authored andcommitted
[SPARK-9719] [ML] Clean up Naive Bayes doc
Small documentation cleanups, including: * Adds documentation for `pi` and `theta` * setParam to `setModelType` Author: Feynman Liang <[email protected]> Closes apache#8047 from feynmanliang/SPARK-9719 and squashes the following commits: b372438 [Feynman Liang] Clean up naive bayes doc
1 parent cd540c1 commit 85be65b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mllib/src/main/scala/org/apache/spark/ml/classification/NaiveBayes.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ class NaiveBayes(override val uid: String)
8686
* Set the model type using a string (case-sensitive).
8787
* Supported options: "multinomial" and "bernoulli".
8888
* Default is "multinomial"
89+
* @group setParam
8990
*/
9091
def setModelType(value: String): this.type = set(modelType, value)
9192
setDefault(modelType -> OldNaiveBayes.Multinomial)
@@ -101,6 +102,9 @@ class NaiveBayes(override val uid: String)
101102

102103
/**
103104
* Model produced by [[NaiveBayes]]
105+
* @param pi log of class priors, whose dimension is C (number of classes)
106+
* @param theta log of class conditional probabilities, whose dimension is C (number of classes)
107+
* by D (number of features)
104108
*/
105109
class NaiveBayesModel private[ml] (
106110
override val uid: String,

0 commit comments

Comments
 (0)