public static enum RoccaContourDataBlock.SweepIndx extends java.lang.Enum<RoccaContourDataBlock.SweepIndx>
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.
Modifier and Type | Method and Description |
---|---|
int |
getIndx() |
static RoccaContourDataBlock.SweepIndx |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static RoccaContourDataBlock.SweepIndx[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RoccaContourDataBlock.SweepIndx DOWN
public static final RoccaContourDataBlock.SweepIndx FLAT
public static final RoccaContourDataBlock.SweepIndx UP
public static RoccaContourDataBlock.SweepIndx[] values()
for (RoccaContourDataBlock.SweepIndx c : RoccaContourDataBlock.SweepIndx.values()) System.out.println(c);
public static RoccaContourDataBlock.SweepIndx valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getIndx()