|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rule.Variable
The Variable
class defines an abstract class for a variable
object.
Field Summary | |
protected int |
column
|
protected java.util.Vector |
labels
|
protected java.lang.String |
name
|
protected java.lang.String |
value
|
Constructor Summary | |
Variable()
Creates a variable object. |
|
Variable(java.lang.String name)
Creates a variable object with specified name. |
Method Summary | |
boolean |
categorical()
Checks if the variable is a categorical variable. |
abstract void |
computeStatistics(java.lang.String inValue)
Computes statistics for the variable. |
java.lang.String |
getDecodedValue(float[] act,
int index)
Retrieves the decoded value at the given index |
int |
getIndex(java.lang.String label)
Retrieves the index of the given label. |
java.lang.String |
getLabel(int index)
Retrieves the label at the specified index. |
java.util.Vector |
getLabels()
Retrieves all the labels for this variable. |
java.lang.String |
getLabelsAsString()
Retrieves a string containing all the labels separated by spaces. |
java.lang.String |
getName()
Retrieves the variable name. |
java.lang.String |
getValue()
Retrieves the value of the variable. |
abstract int |
normalize(java.lang.String inValue,
float[] outArray,
int inx)
Normalizes the variable. |
int |
normalizedSize()
Retrieves the normalized size of the variable. |
void |
setColumn(int column)
Sets the column (in a DataSet). |
void |
setLabels(java.lang.String newLabels)
Sets the labels for the variable from the given string. |
void |
setValue(java.lang.String value)
Sets the value of the variable. |
java.lang.String |
toString()
Retrieves the name of the variable. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.lang.String name
protected java.lang.String value
protected java.util.Vector labels
protected int column
Constructor Detail |
public Variable()
public Variable(java.lang.String name)
name
- the String object that contains the variable nameMethod Detail |
public java.lang.String getName()
public void setValue(java.lang.String value)
value
- the String object that contains the value for the variablepublic java.lang.String getValue()
public void setLabels(java.lang.String newLabels)
newLabels
- the String object that contains the labels, separated
by spacespublic java.lang.String getLabel(int index)
index
- the integer of the indexpublic java.util.Vector getLabels()
public java.lang.String getLabelsAsString()
public int getIndex(java.lang.String label)
label
- the String object that contains the label whose index is returnedpublic boolean categorical()
public java.lang.String toString()
public void setColumn(int column)
column
- the integer that represents the columnpublic abstract void computeStatistics(java.lang.String inValue)
inValue
- the String object used as input to the computationpublic abstract int normalize(java.lang.String inValue, float[] outArray, int inx)
inValue
- the String object containing the input valueoutArray
- the float[] object that contains the normalized valueinx
- the integer that represents the indexpublic int normalizedSize()
public java.lang.String getDecodedValue(float[] act, int index)
act
- the float[] object that contains the values to be decodedindex
- the integer index value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |