Uh oh!
There was an error while loading. Please reload this page.
[SPARK-13089][ML] [Doc] spark.ml Naive Bayes user guide and examples - #11015
[SPARK-13089][ML] [Doc] spark.ml Naive Bayes user guide and examples#11015hhbyyh wants to merge 11 commits into
Conversation
SparkQA
commented
Feb 2, 2016
Test build #50531 has finished for PR 11015 at commit
|
| package org.apache.spark.examples.ml; | ||
| // $example on$ | ||
| import org.apache.spark.SparkConf; |
There was a problem hiding this comment.
I would not include SparkConf or JavaSparkContext
jkbradley
commented
Apr 8, 2016
test this please |
SparkQA
commented
Apr 8, 2016
Test build #55389 has finished for PR 11015 at commit
|
SparkQA
commented
Apr 10, 2016
Test build #55471 has finished for PR 11015 at commit
|
hhbyyh
commented
Apr 10, 2016
Thanks for the review. Updated according to the comments. |
| probabilistic classifiers based on applying Bayes' theorem with strong (naive) independence | ||
| assumptions between the features. More information about the spark.ml implementation can be | ||
| found further in the section on [Naive Bayes in MLlib](mllib-naive-bayes.html#naive-bayes-sparkmllib). | ||
There was a problem hiding this comment.
I think it's better to clarify ml.NaiveBayes supports Multinomial NB and Bernoulli NB. Meanwhile, we should provide the link to corresponding documents. You can refer the NaiveBayes API doc.
There was a problem hiding this comment.
Thanks for taking a look. The wiki link already provided a good overall introduction to Naive Bayes. I'll add some clarification. And in the mllib documents, it clarifies naive Bayes supports both Multinomial and Bernoulli.
SparkQA
commented
Apr 12, 2016
Test build #55596 has finished for PR 11015 at commit
|
| .setLabelCol("label") | ||
| .setPredictionCol("prediction") | ||
| .setMetricName("precision") | ||
| val accuracy = evaluator.evaluate(predictions) |
There was a problem hiding this comment.
I would call it "precision" instead of "accuracy" since it might confuse people (even though they are the same here).
jkbradley
commented
Apr 12, 2016
Just that 1 comment |
SparkQA
commented
Apr 13, 2016
Test build #55694 has finished for PR 11015 at commit
|
jkbradley
commented
Apr 13, 2016
LGTM |
hhbyyh
commented
Apr 14, 2016
Thanks @jkbradley |
jira: https://issues.apache.org/jira/browse/SPARK-13089
Add section in ml-classification.md for NaiveBayes DataFrame-based API, plus example code (using include_example to clip code from examples/ folder files).