Repository: spark
Updated Branches:
  refs/heads/master 970ab8f6d -> 188321623


[SPARKR][MINOR] Fix example of spark.naiveBayes

## What changes were proposed in this pull request?

The original example doesn't work because the features are not categorical. 
This PR fixes this by changing to another dataset.

## How was this patch tested?

Manual test.

Author: Junyang Qian <junya...@databricks.com>

Closes #14820 from junyangq/SPARK-FixNaiveBayes.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/18832162
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/18832162
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/18832162

Branch: refs/heads/master
Commit: 18832162357282ec81515b5b2ba93747be3ad18b
Parents: 970ab8f
Author: Junyang Qian <junya...@databricks.com>
Authored: Fri Aug 26 11:01:48 2016 -0700
Committer: Felix Cheung <felixche...@apache.org>
Committed: Fri Aug 26 11:01:48 2016 -0700

----------------------------------------------------------------------
 R/pkg/R/mllib.R | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/18832162/R/pkg/R/mllib.R
----------------------------------------------------------------------
diff --git a/R/pkg/R/mllib.R b/R/pkg/R/mllib.R
index dfc5a1c..6808aae 100644
--- a/R/pkg/R/mllib.R
+++ b/R/pkg/R/mllib.R
@@ -747,10 +747,11 @@ setMethod("summary", signature(object = 
"MultilayerPerceptronClassificationModel
 #' @export
 #' @examples
 #' \dontrun{
-#' df <- createDataFrame(infert)
+#' data <- as.data.frame(UCBAdmissions)
+#' df <- createDataFrame(data)
 #'
 #' # fit a Bernoulli naive Bayes model
-#' model <- spark.naiveBayes(df, education ~ ., smoothing = 0)
+#' model <- spark.naiveBayes(df, Admit ~ Gender + Dept, smoothing = 0)
 #'
 #' # get the summary of the model
 #' summary(model)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to