zhengruifeng commented on issue #26858: [SPARK-30120][ML] Use BoundedPriorityQueue for small dataset in LSH approxNearestNeighbors URL: https://github.com/apache/spark/pull/26858#issuecomment-564916604 I am afraid this PR is wrong. > Use BoundedPriorityQueue for small dataset in LSH approxNearestNeighbors Not for small dataset but for small `numNearestNeighbors`. Only when `numNearestNeighbors` is small, we can use a max-heap (BoundedPriorityQueue) to directly obtain top entries.
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org