Class EuclideanSphericalSimplifiedElkanKMeans.Instance

    • Field Detail

      • sums

        double[][] sums
        Sum aggregate for the new mean.
      • newmeans

        double[][] newmeans
        Scratch space for new means.
      • sep

        double[] sep
        Cluster separation
    • Constructor Detail

      • Instance

        public Instance​(Relation<? extends NumberVector> relation,
                        double[][] means)
        Constructor.
        Parameters:
        relation - Relation
        means - Initial means
    • Method Detail

      • iterate

        public int iterate​(int iteration)
        Description copied from class: AbstractKMeans.Instance
        Main loop function.
        Overrides:
        iterate in class SphericalKMeans.Instance
        Parameters:
        iteration - Iteration number (beginning at 1)
        Returns:
        Number of reassigned points
      • initialAssignToNearestCluster

        protected int initialAssignToNearestCluster()
        Perform initial cluster assignment.
        Returns:
        Number of changes (i.e., relation size)
      • updateBounds

        protected void updateBounds​(double[] move)
        Update the bounds for k-means.
        Parameters:
        move - Movement of centers