aboutsummaryrefslogtreecommitdiff
path: root/mllib/src/main/scala/org/apache/spark/ml/regression/AFTSurvivalRegression.scala
diff options
context:
space:
mode:
authorNick Pentreath <nickp@za.ibm.com>2016-06-22 10:05:25 -0700
committerXiangrui Meng <meng@databricks.com>2016-06-22 10:05:25 -0700
commit18faa588ca11190890d2eb569d7497fbb25eee5c (patch)
tree309c146287fdb3112772d9d41172b73427be2323 /mllib/src/main/scala/org/apache/spark/ml/regression/AFTSurvivalRegression.scala
parentea3a12b0147821960f8dabdc58d726f07f1f0e52 (diff)
downloadspark-18faa588ca11190890d2eb569d7497fbb25eee5c.tar.gz
spark-18faa588ca11190890d2eb569d7497fbb25eee5c.tar.bz2
spark-18faa588ca11190890d2eb569d7497fbb25eee5c.zip
[SPARK-16127][ML][PYPSARK] Audit @Since annotations related to ml.linalg
[SPARK-14615](https://issues.apache.org/jira/browse/SPARK-14615) and #12627 changed `spark.ml` pipelines to use the new `ml.linalg` classes for `Vector`/`Matrix`. Some `Since` annotations for public methods/vals have not been updated accordingly to be `2.0.0`. This PR updates them. ## How was this patch tested? Existing unit tests. Author: Nick Pentreath <nickp@za.ibm.com> Closes #13840 from MLnick/SPARK-16127-ml-linalg-since.
Diffstat (limited to 'mllib/src/main/scala/org/apache/spark/ml/regression/AFTSurvivalRegression.scala')
-rw-r--r--mllib/src/main/scala/org/apache/spark/ml/regression/AFTSurvivalRegression.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/mllib/src/main/scala/org/apache/spark/ml/regression/AFTSurvivalRegression.scala b/mllib/src/main/scala/org/apache/spark/ml/regression/AFTSurvivalRegression.scala
index fe65e3e810..2dbac49ccf 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/regression/AFTSurvivalRegression.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/regression/AFTSurvivalRegression.scala
@@ -286,7 +286,7 @@ object AFTSurvivalRegression extends DefaultParamsReadable[AFTSurvivalRegression
@Since("1.6.0")
class AFTSurvivalRegressionModel private[ml] (
@Since("1.6.0") override val uid: String,
- @Since("1.6.0") val coefficients: Vector,
+ @Since("2.0.0") val coefficients: Vector,
@Since("1.6.0") val intercept: Double,
@Since("1.6.0") val scale: Double)
extends Model[AFTSurvivalRegressionModel] with AFTSurvivalRegressionParams with MLWritable {
@@ -307,7 +307,7 @@ class AFTSurvivalRegressionModel private[ml] (
@Since("1.6.0")
def setQuantilesCol(value: String): this.type = set(quantilesCol, value)
- @Since("1.6.0")
+ @Since("2.0.0")
def predictQuantiles(features: Vector): Vector = {
// scale parameter for the Weibull distribution of lifetime
val lambda = math.exp(BLAS.dot(coefficients, features) + intercept)
@@ -319,7 +319,7 @@ class AFTSurvivalRegressionModel private[ml] (
Vectors.dense(quantiles)
}
- @Since("1.6.0")
+ @Since("2.0.0")
def predict(features: Vector): Double = {
math.exp(BLAS.dot(coefficients, features) + intercept)
}