You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/10/10 18:03:51 UTC

[GitHub] [spark] srowen commented on a change in pull request #30000: [SPARK-33111][ML] aft transform optimization

srowen commented on a change in pull request #30000:
URL: https://github.com/apache/spark/pull/30000#discussion_r502815872



##########
File path: mllib/src/main/scala/org/apache/spark/ml/regression/AFTSurvivalRegression.scala
##########
@@ -421,9 +421,17 @@ class AFTSurvivalRegressionModel private[ml] (
     }
 
     if (hasQuantilesCol) {
-      val predictQuantilesUDF = udf { features: Vector => predictQuantiles(features)}
+      val baseQuantiles = $(quantileProbabilities)
+        .map(q => math.exp(math.log(-math.log1p(-q)) * scale))
+      val lambdaCol = if ($(predictionCol).nonEmpty) {

Review comment:
       I think you're probably right here but why is lambdaCol the first predictionCol here?




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org