zhengruifeng opened a new pull request #27040: [SPARK-30380][ML] Refactor 
RandomForest.findSplits
URL: https://github.com/apache/spark/pull/27040
 
 
   ### What changes were proposed in this pull request?
   Refactor `RandomForest.findSplits` by applying `aggregateByKey` instead of 
`groupByKey`
   
   
   ### Why are the changes needed?
   Current impl of `RandomForest.findSplits` uses `groupByKey` to collect 
non-zero values for each feature, so it is quite dangerous.
   After looking into the following logic to obtain splits, I found that 
collecting all non-zero values are not needed, and we only need weightSums for 
all distinct values.
   
   ### Does this PR introduce any user-facing change?
   No
   
   
   ### How was this patch tested?
   existing testsuites

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to