amanomer commented on a change in pull request #26483: [SPARK-29823][MLIB] 
Improper persist strategy in mllib.clustering.KMeans.run()
URL: https://github.com/apache/spark/pull/26483#discussion_r345253320
 
 

 ##########
 File path: mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeans.scala
 ##########
 @@ -223,12 +223,12 @@ class KMeans private (
 
     // Compute squared norms and cache them.
     val norms = data.map(Vectors.norm(_, 2.0))
 
 Review comment:
   `norms` have only one child `zippedData` so all actions that rely on `norms` 
also rely on `zippedData` and in runAlgorithm(), `zippedData` have been used 
multiple times.

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