Class SameSizeKMeans.Meta

  • Enclosing class:
    SameSizeKMeans<V extends NumberVector>

    private static class SameSizeKMeans.Meta
    extends java.lang.Object
    Object metadata.
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) double[] dists
      Distance to the cluster centers.
      (package private) int primary
      Indexes: primary assignment (current or best), secondary assignment (second best or worst).
      (package private) int secondary
      Indexes: primary assignment (current or best), secondary assignment (second best or worst).
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Meta​(int k)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected double gain​(int i)
      Gain from switching to cluster i.
      protected double priority()
      Priority / badness: difference between best and worst.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • dists

        double[] dists
        Distance to the cluster centers.
      • primary

        int primary
        Indexes: primary assignment (current or best), secondary assignment (second best or worst). The actual meaning differs from initialization to iteration phase!
      • secondary

        int secondary
        Indexes: primary assignment (current or best), secondary assignment (second best or worst). The actual meaning differs from initialization to iteration phase!
    • Constructor Detail

      • Meta

        protected Meta​(int k)
        Constructor.
        Parameters:
        k - Number of clusters
    • Method Detail

      • priority

        protected double priority()
        Priority / badness: difference between best and worst. (Assuming that "secondary" is the worst).
        Returns:
        Priority
      • gain

        protected double gain​(int i)
        Gain from switching to cluster i.
        Parameters:
        i - Target cluster
        Returns:
        Gain