aboutsummaryrefslogtreecommitdiff
path: root/mllib
diff options
context:
space:
mode:
authorFeynman Liang <fliang@databricks.com>2015-08-07 17:21:12 -0700
committerJoseph K. Bradley <joseph@databricks.com>2015-08-07 17:21:12 -0700
commit85be65b39ce669f937a898195a844844d757666b (patch)
treeed699fbf6a305243041ca25c77a2e55d9788ed64 /mllib
parentcd540c1e59561ad1fdac59af6170944c60e685d8 (diff)
downloadspark-85be65b39ce669f937a898195a844844d757666b.tar.gz
spark-85be65b39ce669f937a898195a844844d757666b.tar.bz2
spark-85be65b39ce669f937a898195a844844d757666b.zip
[SPARK-9719] [ML] Clean up Naive Bayes doc
Small documentation cleanups, including: * Adds documentation for `pi` and `theta` * setParam to `setModelType` Author: Feynman Liang <fliang@databricks.com> Closes #8047 from feynmanliang/SPARK-9719 and squashes the following commits: b372438 [Feynman Liang] Clean up naive bayes doc
Diffstat (limited to 'mllib')
-rw-r--r--mllib/src/main/scala/org/apache/spark/ml/classification/NaiveBayes.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/mllib/src/main/scala/org/apache/spark/ml/classification/NaiveBayes.scala b/mllib/src/main/scala/org/apache/spark/ml/classification/NaiveBayes.scala
index b46b676204..97cbaf1fa8 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/classification/NaiveBayes.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/classification/NaiveBayes.scala
@@ -86,6 +86,7 @@ class NaiveBayes(override val uid: String)
* Set the model type using a string (case-sensitive).
* Supported options: "multinomial" and "bernoulli".
* Default is "multinomial"
+ * @group setParam
*/
def setModelType(value: String): this.type = set(modelType, value)
setDefault(modelType -> OldNaiveBayes.Multinomial)
@@ -101,6 +102,9 @@ class NaiveBayes(override val uid: String)
/**
* Model produced by [[NaiveBayes]]
+ * @param pi log of class priors, whose dimension is C (number of classes)
+ * @param theta log of class conditional probabilities, whose dimension is C (number of classes)
+ * by D (number of features)
*/
class NaiveBayesModel private[ml] (
override val uid: String,