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

    https://github.com/apache/spark/pull/13927#discussion_r68653297
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -420,44 +440,96 @@ setMethod("spark.naiveBayes", signature(data = 
"SparkDataFrame", formula = "form
                 return(new("NaiveBayesModel", jobj = jobj))
               })
     
    -# Saves the Bernoulli naive Bayes model to the input path.
    -
    -#' @param path The directory where the model is saved
    -#' @param overwrite Overwrites or not if the output path already exists. 
Default is FALSE
    -#'                  which means throw exception if the output path exists.
    +#' Accelerated Failure Time (AFT) Survival Regression Model.
     #'
    -#' @rdname spark.naiveBayes
    +#' \code{spark.survreg} fits an accelerated failure time (AFT) survival 
regression model on
    +#' a SparkDataFrame. Users can call \code{summary} to get a summary of the 
fitted AFT model,
    +#' \code{predict} to make predictions on new data, and 
\code{write.ml}/\code{read.ml} to
    +#' save/load fitted models.
    +#'
    +#' @param data A SparkDataFrame for training.
    +#' @param formula A symbolic description of the model to be fitted. 
Currently only a few formula
    +#'                operators are supported, including '~', ':', '+', and 
'-'.
    +#'                Note that operator '.' is not supported currently.
    +#' @return \code{spark.survreg} returns a fitted AFT survival regression 
model
    +#' @rdname spark.survreg
    +#' @seealso survival: 
\url{https://cran.r-project.org/web/packages/survival/}
     #' @export
    -#' @seealso \link{read.ml}
    -#' @note write.ml(NaiveBayesModel, character) since 2.0.0
    -setMethod("write.ml", signature(object = "NaiveBayesModel", path = 
"character"),
    -          function(object, path, overwrite = FALSE) {
    -            writer <- callJMethod(object@jobj, "write")
    -            if (overwrite) {
    -              writer <- callJMethod(writer, "overwrite")
    -            }
    -            invisible(callJMethod(writer, "save", path))
    -          })
    -
    -#' Save fitted MLlib model to the input path
    +#' @examples
    +#' \dontrun{
    +#' library(survival)
    --- End diff --
    
    The ovarian dataset comes with the `survival` package. The dataset cannot 
be loaded if not importing the library in local.


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