zhengruifeng created SPARK-37959:
------------------------------------

             Summary: Fix the UT of checking norm in KMeans & BiKMeans
                 Key: SPARK-37959
                 URL: https://issues.apache.org/jira/browse/SPARK-37959
             Project: Spark
          Issue Type: Improvement
          Components: ML
    Affects Versions: 3.3.0
            Reporter: zhengruifeng


In KMeansSuite and BisectingKMeansSuite, there are some unused lines:

 
{code:java}
model1.clusterCenters.forall(Vectors.norm(_, 2) == 1.0 {code}
 

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;

 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to