Class CompareMeans.Instance

    • Field Detail

      • cdist

        double[][] cdist
        Cluster center distances.
    • Constructor Detail

      • Instance

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

      • iterate

        protected int iterate​(int iteration)
        Description copied from class: AbstractKMeans.Instance
        Main loop function.
        Specified by:
        iterate in class AbstractKMeans.Instance
        Parameters:
        iteration - Iteration number (beginning at 1)
        Returns:
        Number of reassigned points
      • recomputeSeperation

        protected void recomputeSeperation​(double[][] means,
                                           double[][] cdist)
        Recompute the separation of cluster means.

        Used by Sort and Compare variants.

        Parameters:
        means - Means
        cdist - Center-to-Center distances (half-sqrt scaled)