Class SphericalAFKMC2.Instance

  • Enclosing class:
    SphericalAFKMC2

    protected static class SphericalAFKMC2.Instance
    extends AFKMC2.Instance
    Abstract instance implementing the weight handling.
    Author:
    Erich Schubert
    • Field Detail

      • alpha

        protected double alpha
        Parameter to balance distance vs. uniform sampling.
    • Constructor Detail

      • Instance

        public Instance​(Relation<? extends NumberVector> relation,
                        int m,
                        double alpha,
                        RandomFactory rnd)
        Constructor.
        Parameters:
        relation - Data relation
        alpha - Alpha parameter
        m - M parameter
        rnd - Random generator
    • Method Detail

      • similarity

        protected double similarity​(NumberVector a,
                                    DBIDRef b)
        Compute the distance of two objects.
        Parameters:
        a - First object
        b - Second object
        Returns:
        Distance
      • distance

        protected double distance​(DBIDRef cand,
                                  java.util.List<NumberVector> means)
        Description copied from class: KMC2.Instance
        Minimum distance to the current means.
        Overrides:
        distance in class KMC2.Instance
        Parameters:
        cand - Candidate
        means - Current means
        Returns:
        Minimum distance