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

    https://github.com/apache/spark/pull/12683#discussion_r61066737
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -83,6 +83,54 @@ setMethod("glm", signature(formula = "formula", family = 
"ANY", data = "SparkDat
                 return(new("GeneralizedLinearRegressionModel", jobj = jobj))
               })
     
    +#' Save the GeneralizedLinearRegression model to the input path.
    +#'
    +#' @param object A fitted GLM model
    +#' @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.
    +#'
    +#' @rdname ml.save
    +#' @name ml.save
    +#' @export
    +#' @examples
    +#' \dontrun{
    +#' df <- createDataFrame(sqlContext, infert)
    +#' model <- glm(education ~ ., df)
    +#' path <- "path/to/model"
    +#' ml.save(model, path)
    +#' }
    +setMethod("ml.save", signature(object = 
"GeneralizedLinearRegressionModel", path = "character"),
    +function(object, path, overwrite = FALSE) {
    --- End diff --
    
    indent


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to