zhengruifeng opened a new pull request #30000:
URL: https://github.com/apache/spark/pull/30000


   ### What changes were proposed in this pull request?
   1, when `predictionCol` and `quantilesCol` are both set, we only need one 
prediction for each row: prediction is just the variable `lambda` in 
`predictQuantiles`;
   2, in the computation of variable `quantiles` in `predictQuantiles`, a 
pre-computed vector `val baseQuantiles = $(quantileProbabilities).map(q => 
math.exp(math.log(-math.log1p(-q)) * scale))` can be reused for each row;
   
   
   ### Why are the changes needed?
   avoid redundant computation in transform, like what we did in 
`ProbabilisticClassificationModel`, `GaussianMixtureModel`, etc
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   existing testsuite


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

Reply via email to