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

    https://github.com/apache/spark/pull/13023#discussion_r64106271
  
    --- 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 --
    
    I'm referring to line
    ```
    #' Fit a k-means model
    #'
    #' Fit a k-means model, similarly to R's kmeans().
    ```
    ie. the first line and the third line.
    
    For example, it shows up for `glm` like this 
http://spark.apache.org/docs/latest/api/R/glm.html
    
![image](https://cloud.githubusercontent.com/assets/8969467/15441925/a2ece6aa-1e92-11e6-9df4-44a65ff1e04a.png)
    
    Which I'd think would be rather odd if they are not consistent.


---
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