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

    https://github.com/apache/spark/pull/11447#discussion_r54573876
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -61,6 +61,34 @@ setMethod("glm", signature(formula = "formula", family = 
"ANY", data = "DataFram
                 return(new("PipelineModel", model = model))
               })
     
    +#' Fit an accelerated failure time (AFT) survival regression model.
    +#'
    +#' Fit an accelerated failure time (AFT) survival regression model, 
similarly to R's survreg().
    +#'
    +#' @param formula A symbolic description of the model to be fitted. 
Currently only a few formula
    +#'                operators are supported, including '~', ':', '+', and 
'-'.
    +#' @param data DataFrame for training.
    +#' @return a fitted MLlib model
    +#' @rdname survreg
    +#' @export
    +#' @examples
    +#'\dontrun{
    +#' sc <- sparkR.init()
    +#' sqlContext <- sparkRSQL.init(sc)
    +#' library(survival)
    +#' data(ovarian)
    +#' df <- createDataFrame(sqlContext, ovarian)
    +#' model <- survreg(Surv(futime, fustat) ~ ecog_ps + rx, df)
    +#' summary(model)
    +#'}
    +setMethod("survreg", signature(formula = "formula", data = "DataFrame"),
    --- End diff --
    
    We only support "weibull" distribution in ```AFTSurvivalRegression```, so 
we don't need arguments ```dist``` like R's ```survreg``` until we supporting 
more distributions. 


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