Repository: spark
Updated Branches:
  refs/heads/master 72634f27e -> 2e86cf1b0


[SPARK-11527][ML][PYSPARK] PySpark AFTSurvivalRegressionModel should expose 
coefficients/intercept/scale

PySpark ```AFTSurvivalRegressionModel``` should expose 
coefficients/intercept/scale. mengxr vectorijk

Author: Yanbo Liang <yblia...@gmail.com>

Closes #9492 from yanboliang/spark-11527.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/2e86cf1b
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/2e86cf1b
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/2e86cf1b

Branch: refs/heads/master
Commit: 2e86cf1b01ae0ed69f72bf8054330440d432eeb7
Parents: 72634f2
Author: Yanbo Liang <yblia...@gmail.com>
Authored: Thu Nov 5 09:00:03 2015 -0800
Committer: Xiangrui Meng <m...@databricks.com>
Committed: Thu Nov 5 09:00:03 2015 -0800

----------------------------------------------------------------------
 python/pyspark/ml/regression.py | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/2e86cf1b/python/pyspark/ml/regression.py
----------------------------------------------------------------------
diff --git a/python/pyspark/ml/regression.py b/python/pyspark/ml/regression.py
index ab26616..d7b4fd9 100644
--- a/python/pyspark/ml/regression.py
+++ b/python/pyspark/ml/regression.py
@@ -824,6 +824,30 @@ class AFTSurvivalRegressionModel(JavaModel):
     .. versionadded:: 1.6.0
     """
 
+    @property
+    @since("1.6.0")
+    def coefficients(self):
+        """
+        Model coefficients.
+        """
+        return self._call_java("coefficients")
+
+    @property
+    @since("1.6.0")
+    def intercept(self):
+        """
+        Model intercept.
+        """
+        return self._call_java("intercept")
+
+    @property
+    @since("1.6.0")
+    def scale(self):
+        """
+        Model scale paramter.
+        """
+        return self._call_java("scale")
+
     def predictQuantiles(self, features):
         """
         Predicted Quantiles


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

Reply via email to