Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13023#discussion_r63113352
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -269,9 +349,29 @@ setMethod("summary", signature(object = 
"NaiveBayesModel"),
                 return(list(apriori = apriori, tables = tables))
               })
     
    +#' Makes predictions from a model produced by spark.naiveBayes(),
    +#' similarly to R package e1071's predict.
    +#'
    +#' @param object A fitted naive Bayes model
    +#' @param newData SparkDataFrame for testing
    +#' @return SparkDataFrame containing predicted labels in a column named 
"prediction"
    +#' @rdname predict
    +#' @name predict
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#' model <- spark.naiveBayes(trainingData, y ~ x)
    +#' predicted <- predict(model, testData)
    +#' showDF(predicted)
    +#'}
    +setMethod("predict", signature(object = "NaiveBayesModel"),
    +          function(object, newData) {
    +            return(dataFrame(callJMethod(object@jobj, "transform", 
newData@sdf)))
    +          })
    +
     #' Fit a k-means model
     #'
    -#' Fit a k-means model, similarly to R's kmeans().
    +#' Fits a k-means model, similarly to R's kmeans().
    --- End diff --
    
    seems to be changing a few times here - should this be `Fits a ...` or `Fit 
a ...`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to