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

    https://github.com/apache/spark/pull/8926#discussion_r40882471
  
    --- Diff: python/pyspark/ml/regression.py ---
    @@ -609,6 +611,147 @@ class GBTRegressionModel(TreeEnsembleModels):
         """
     
     
    +@inherit_doc
    +class AFTSurvivalRegression(JavaEstimator, HasFeaturesCol, HasLabelCol, 
HasPredictionCol,
    +                            HasFitIntercept, HasMaxIter, HasTol):
    +    """
    +    Accelerated Failure Time(AFT) Model Survival Regression
    +
    +    Fit a parametric AFT survival regression model based on the Weibull 
distribution
    +    of the survival time.
    +    see also, 
`https://en.wikipedia.org/wiki/Accelerated_failure_time_model`
    +
    +    >>> from pyspark.mllib.linalg import Vectors
    +    >>> df = sqlContext.createDataFrame([
    +    ...     (1.0, Vectors.dense(1.0), 1.0),
    +    ...     (0.0, Vectors.sparse(1, [], []), 0.0)], ["label", "features", 
"censor"])
    +    >>> aftsr = AFTSurvivalRegression()
    +    >>> model = aftsr.fit(df)
    +    >>> model.transform(df).show()
    +    +-----+---------+------+----------+
    +    |label| features|censor|prediction|
    +    +-----+---------+------+----------+
    +    |  1.0|    [1.0]|   1.0|       1.0|
    +    |  0.0|(1,[],[])|   0.0|       1.0|
    +    +-----+---------+------+----------+
    +    ...
    +
    +    .. versionadded:: 1.6.0
    +    """
    +
    +    # a placeholder to make it appear in the generated doc
    +    censorCol = Param(Params._dummy(), "censorCol",
    +                      "censor column name. The value of this column could 
be 0 or 1. " +
    +                      "If the value is 1, it means the event has occurred 
i.e. " +
    +                      "uncensored; otherwise censored.")
    +    quantileProbabilities = \
    +        Param(Params._dummy(), "quantileProbabilities",
    +              "quantile probabilities array. Values of the quantile 
probabilities array " +
    +              "should be in the range [0, 1] and the array should be 
non-empty.")
    --- End diff --
    
    changed that in doc


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