Class AbstractKMeans.Par<V extends NumberVector>

    • Field Detail

      • k

        protected int k
        k Parameter.
      • maxiter

        protected int maxiter
        Maximum number of iterations.
      • varstat

        protected boolean varstat
        Compute the final variance statistic (not used by all).
    • Constructor Detail

      • Par

        public Par()
    • Method Detail

      • configure

        public void configure​(Parameterization config)
        Description copied from interface: Parameterizer
        Configure the class.

        Note: the status is collected by the parameterization object, so that multiple errors may arise and be reported in one run.

        Specified by:
        configure in interface Parameterizer
        Parameters:
        config - Parameterization
      • getParameterK

        protected void getParameterK​(Parameterization config)
        Get the k parameter.
        Parameters:
        config - Parameterization
      • getParameterDistance

        protected void getParameterDistance​(Parameterization config)
        Get the distance function parameter.
        Parameters:
        config - Parameterization
      • needsMetric

        protected boolean needsMetric()
        Users could use other non-metric distances at their own risk; but some k-means variants make explicit use of the triangle inequality, we emit extra warnings then.
        Returns:
        true if the algorithm uses triangle inequality
      • getParameterInitialization

        protected void getParameterInitialization​(Parameterization config)
        Get the initialization method parameter.
        Parameters:
        config - Parameterization
      • getParameterMaxIter

        protected void getParameterMaxIter​(Parameterization config)
        Get the max iterations parameter.
        Parameters:
        config - Parameterization
      • getParameterVarstat

        protected void getParameterVarstat​(Parameterization config)
        Get the variance statistics parameter.
        Parameters:
        config - Parameterization
      • make

        public abstract AbstractKMeans<V,​?> make()
        Description copied from interface: Parameterizer
        Make an instance after successful configuration.

        Note: your class should return the exact type, only this very broad interface should use Object as return type.

        Specified by:
        make in interface Parameterizer
        Returns:
        a new instance