Package rocca

Enum Class RoccaContourDataBlock.SweepIndx

java.lang.Object
java.lang.Enum<RoccaContourDataBlock.SweepIndx>
rocca.RoccaContourDataBlock.SweepIndx
All Implemented Interfaces:
Serializable, Comparable<RoccaContourDataBlock.SweepIndx>, Constable
Enclosing class:
RoccaContourDataBlock

public static enum RoccaContourDataBlock.SweepIndx extends Enum<RoccaContourDataBlock.SweepIndx>
A field mapping the sweep direction to the nominal index used to train the classifier

The WEKA random forest classifier code stores all attributes as double values. For nominal attributes, WEKA assumes that the stored value refers to the INDEX of the corresponding value. For example, the FREQBEGSWEEP attribute can be down, flat or up. The training dataset uses the values "-1" to indicate down, "0" to indicate flat, and "1" to indicate up. When the classifier is created, it stores these nominal values in an array of length 3, with array index 0 being -1 (down), index 1 being 0 (flat) and index 2 being 1 (up). When an instance gets passed to the classifier for classification, it assumes that the value stored in the attribute refers to the index position (0, 1, or 2), NOT the actual nominal value (-1, 0 or 1). So this enum field is used to map the nominal down-flat-up values to the corresponding array indices used to train the classifier.

IMPORTANT NOTE:

If the order or potential values of the nominal attribute ever change, this enum MUST CHANGE TO MATCH. For example, if down-flat-up are ever reordered in the training set to flat-down-up, the SweepIndx enum needs to be changed to flat=0, down=1 and up=2. Similarly, if 'flat' is dropped and the training set only uses down-up, SweepIndx needs to be changed to flat=0 and up=1.

  • Enum Constant Details

  • Method Details

    • values

      public static RoccaContourDataBlock.SweepIndx[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RoccaContourDataBlock.SweepIndx valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getIndx

      public int getIndx()