Class KNN

    • Field Detail

      • kValueOption

        public IntOption kValueOption
    • Constructor Detail

      • KNN

        public KNN()
    • Method Detail

      • test

        public double test​(List<Instance> x,
                           List<Instance> y)
        Description copied from interface: StatisticalTest
        This method performs a test and returns the correspoding p-value.
        Specified by:
        test in interface StatisticalTest
        Parameters:
        x - List of instances
        y - List of instances
        Returns:
        p-value
      • getDescription

        public void getDescription​(StringBuilder sb,
                                   int indent)
        Description copied from interface: MOAObject
        Returns a string representation of this object. Used in AbstractMOAObject.toString to give a string representation of the object.
        Specified by:
        getDescription in interface MOAObject
        Parameters:
        sb - the stringbuilder to add the description
        indent - the number of characters to indent
      • prepareForUseImpl

        protected void prepareForUseImpl​(TaskMonitor monitor,
                                         ObjectRepository repository)
        Description copied from class: AbstractOptionHandler
        This method describes the implementation of how to prepare this object for use. All classes that extends this class have to implement prepareForUseImpl and not prepareForUse since prepareForUse calls prepareForUseImpl.
        Specified by:
        prepareForUseImpl in class AbstractOptionHandler
        Parameters:
        monitor - the TaskMonitor to use
        repository - the ObjectRepository to use
      • set

        public void set​(List<Instance> x,
                        List<Instance> y)
        Description copied from interface: StatisticalTest
        This method sets the instances for later use in concurrent scenarios. The test is performed by using the call() method.
        Specified by:
        set in interface StatisticalTest
        Parameters:
        x - List of instances
        y - List of instances