Enum MissingDataCompare

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      MATCH
      Always returns 0, considering the missing data to match anything
      MISMATCH
      Always returns 1, considering the missing data to be a mismatch
      VARIABLE
      Treats missing value as like any other value; two missing values match, but a missing value matches nothing else.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()  
      java.lang.String getOptionString()  
      abstract boolean matches​(weka.core.Instance i1, weka.core.Instance i2, weka.core.Attribute att)
      Compare the two instances and return the comparison result.
      static MissingDataCompare valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static MissingDataCompare[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • MATCH

        public static final MissingDataCompare MATCH
        Always returns 0, considering the missing data to match anything
      • MISMATCH

        public static final MissingDataCompare MISMATCH
        Always returns 1, considering the missing data to be a mismatch
      • VARIABLE

        public static final MissingDataCompare VARIABLE
        Treats missing value as like any other value; two missing values match, but a missing value matches nothing else.
    • Method Detail

      • values

        public static MissingDataCompare[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MissingDataCompare c : MissingDataCompare.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MissingDataCompare valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getOptionString

        public java.lang.String getOptionString()
        Specified by:
        getOptionString in interface Enum2TagUtils.TagInfo
        Returns:
        string used on command line to indicate the use of this strategy
      • getDescription

        public java.lang.String getDescription()
        Specified by:
        getDescription in interface Enum2TagUtils.TagInfo
        Returns:
        string which describes comparison strategy for a given
      • matches

        public abstract boolean matches​(weka.core.Instance i1,
                                        weka.core.Instance i2,
                                        weka.core.Attribute att)
        Compare the two instances and return the comparison result. It is assumed that has a missing value for the given attribute.
        Parameters:
        i1 - First instance
        i2 - Second instance
        att - Attribute to be compared between the two instances
        Returns:
        true if the attributes match, false if they do not; the matching mechanism depends on the chosen algorithm.