Class KDTreeFilteringKMeans.Instance

    • Constructor Detail

      • Instance

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

      • getNearestCenter

        protected int getNearestCenter​(double[] mid,
                                       int alive)
        Get the nearest (alive) center to a midpoint.
        Parameters:
        mid - midpoint
        alive - Number of alive centers
        Returns:
        best center
      • isFarther

        protected boolean isFarther​(double[] z_star,
                                    double[] z,
                                    double[] mid,
                                    double[] halfwidth)
        Check if a cluster mean is farther than another. Optimized version of the comparison suggested by Kanungo.