You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "WeichenXu123 (via GitHub)" <gi...@apache.org> on 2023/08/11 02:03:31 UTC

[GitHub] [spark] WeichenXu123 commented on a diff in pull request #42431: [WIP][SPARK-42905][MLLIB] fix spearman correlation incorrect and inconsistent results when data has huge amount of ties

WeichenXu123 commented on code in PR #42431:
URL: https://github.com/apache/spark/pull/42431#discussion_r1290829879


##########
mllib/src/main/scala/org/apache/spark/mllib/stat/correlation/SpearmanCorrelation.scala:
##########
@@ -65,8 +65,8 @@ private[stat] object SpearmanCorrelation extends Correlation with Logging {
         output
       }
       iter.flatMap { case (((j, v), uid), rank) =>
-        // If we see a new value or cachedUids is too big, we flush ids with their average rank.
-        if (j != preCol || v != preVal || cachedUids.size >= 10000000) {

Review Comment:
   What happens if we don't flush it when `cachedUids.size >= 10000000` ? OOM occurs ? 



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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