[ 
https://issues.apache.org/jira/browse/SPARK-37959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17478405#comment-17478405
 ] 

Apache Spark commented on SPARK-37959:
--------------------------------------

User 'zhengruifeng' has created a pull request for this issue:
https://github.com/apache/spark/pull/35247

> 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
>            Priority: Minor
>
> 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