huaxingao commented on a change in pull request #30034:
URL: https://github.com/apache/spark/pull/30034#discussion_r506614718
##########
File path:
mllib/src/main/scala/org/apache/spark/ml/regression/AFTSurvivalRegression.scala
##########
@@ -383,22 +383,25 @@ class AFTSurvivalRegressionModel private[ml] (
/** @group setParam */
@Since("1.6.0")
- def setQuantileProbabilities(value: Array[Double]): this.type =
set(quantileProbabilities, value)
+ def setQuantileProbabilities(value: Array[Double]): this.type = {
+ set(quantileProbabilities, value)
+ _quantiles(0) = $(quantileProbabilities).map(q =>
math.exp(math.log(-math.log1p(-q)) * scale))
+ this
+ }
Review comment:
nit: do we need to call this method explicitly in one of the tests just
to make sure the change here is tested?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]