diff options
author | Yuhao Yang <hhbyyh@gmail.com> | 2015-06-02 23:15:38 -0700 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2015-06-02 23:15:38 -0700 |
commit | 43adbd56114ba80039a23909b0a30d393eaacc62 (patch) | |
tree | 9f0330cd25c9484914a527f53bdb92b7d1698976 /docs/mllib-naive-bayes.md | |
parent | ccaa823290cbe859cd224ac0f7071dfd0218b669 (diff) | |
download | spark-43adbd56114ba80039a23909b0a30d393eaacc62.tar.gz spark-43adbd56114ba80039a23909b0a30d393eaacc62.tar.bz2 spark-43adbd56114ba80039a23909b0a30d393eaacc62.zip |
[SPARK-8043] [MLLIB] [DOC] update NaiveBayes and SVM examples in doc
jira: https://issues.apache.org/jira/browse/SPARK-8043
I found some issues during testing the save/load examples in markdown Documents, as a part of 1.4 QA plan
Author: Yuhao Yang <hhbyyh@gmail.com>
Closes #6584 from hhbyyh/naiveDocExample and squashes the following commits:
a01a206 [Yuhao Yang] fix for Gaussian mixture
2fb8b96 [Yuhao Yang] update NaiveBayes and SVM examples in doc
Diffstat (limited to 'docs/mllib-naive-bayes.md')
-rw-r--r-- | docs/mllib-naive-bayes.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/mllib-naive-bayes.md b/docs/mllib-naive-bayes.md index acdcc37148..bf6d124fd5 100644 --- a/docs/mllib-naive-bayes.md +++ b/docs/mllib-naive-bayes.md @@ -53,7 +53,7 @@ val splits = parsedData.randomSplit(Array(0.6, 0.4), seed = 11L) val training = splits(0) val test = splits(1) -val model = NaiveBayes.train(training, lambda = 1.0, model = "multinomial") +val model = NaiveBayes.train(training, lambda = 1.0, modelType = "multinomial") val predictionAndLabel = test.map(p => (model.predict(p.features), p.label)) val accuracy = 1.0 * predictionAndLabel.filter(x => x._1 == x._2).count() / test.count() |