Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-37959

Fix the UT of checking norm in KMeans & BiKMeans

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.3.0
    • 3.2.1, 3.3.0
    • ML
    • None

    Description

      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;

       

      Attachments

        Activity

          People

            podongfeng Ruifeng Zheng
            podongfeng Ruifeng Zheng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: