srowen commented on a change in pull request #27758: [SPARK-31007][ML] KMeans
optimization based on triangle-inequality
URL: https://github.com/apache/spark/pull/27758#discussion_r386461703
##########
File path: mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeans.scala
##########
@@ -266,30 +266,35 @@ class KMeans private (
var converged = false
var cost = 0.0
var iteration = 0
+ var totalRadiiTime = 0L
val iterationStartTime = System.nanoTime()
instr.foreach(_.logNumFeatures(centers.head.vector.size))
// Execute iterations of Lloyd's algorithm until converged
while (iteration < maxIterations && !converged) {
+ val radiiStartTime = System.nanoTime()
Review comment:
You might remove this after testing; it's not super important.
----------------------------------------------------------------
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]