zhengruifeng opened a new pull request #35247:
URL: https://github.com/apache/spark/pull/35247


   ### What changes were proposed in this pull request?
   
   In `KMeansSuite` and `BisectingKMeansSuite`, there are some unused lines:
   
   ``` 
   model1.clusterCenters.forall(Vectors.norm(_, 2) == 1.0 
   ```
    
   For cosine distance, the norm of centering vector should be 1, so the norm 
checking is meaningful;
   
   For euclidean distance, the norm checking is meaningless;
   
   
   ### Why are the changes needed?
   
   to enable norm checking for cosine distance, and diable it for euclidean 
distance
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   updated 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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to