Skip to content
Snippets Groups Projects
Commit 18832162 authored by Junyang Qian's avatar Junyang Qian Committed by Felix Cheung
Browse files

[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 <junyangq@databricks.com>

Closes #14820 from junyangq/SPARK-FixNaiveBayes.
parent 970ab8f6
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment