Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-546

Truncation issue in KMeansPlusPlusClusterer

Rank to TopRank to BottomVotersWatch issueWatchersConvert to sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0
    • Labels:

      Description

      The for loop inside KMeansPlusPlusClusterer.chooseInitialClusters defines a variable
      int sum = 0;
      This variable should have type double, rather than int. Using an int causes the method to truncate the distances between points to (square roots of) integers. It's especially bad when the distances between points are typically less than 1.

      As an aside, in version 2.2, this bug manifested itself by making the clusterer return empty clusters. I wonder if the EmptyClusterStrategy would still be necessary if this bug were fixed.

        Attachments

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              Unassigned
              Reporter:
              npaymer Nate Paymer

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment