Skip to content

Commit

Permalink
[SPARK-9719] [ML] Clean up Naive Bayes doc
Browse files Browse the repository at this point in the history
Small documentation cleanups, including:
 * Adds documentation for `pi` and `theta`
 * setParam to `setModelType`

Author: Feynman Liang <fliang@databricks.com>

Closes apache#8047 from feynmanliang/SPARK-9719 and squashes the following commits:

b372438 [Feynman Liang] Clean up naive bayes doc
  • Loading branch information
Feynman Liang authored and jkbradley committed Aug 8, 2015
1 parent cd540c1 commit 85be65b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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,
Expand Down

0 comments on commit 85be65b

Please sign in to comment.