|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--learn.Variable
The Variable
abstract class provides the common support
necessary for continuous, numeric discrete, and categorical variables.
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 . |
|
Variable(java.lang.String name)
Creates a Variable with the given name. |
Method Summary | |
abstract void |
computeStatistics(java.lang.String inValue)
Computes the minimum and maximum values for this variable based on the given string, but can also be used to compute other statistics as well. |
java.lang.String |
getDecodedValue(double[] act,
int index)
Method getDecodedValue |
int |
getIndex(java.lang.String label)
Retrieves the index for the given label. |
java.lang.String |
getLabel(int index)
Retrieves the label with the specified index. |
java.lang.String |
getLabels()
Retrieves all the labels from a categorical variable. |
java.lang.String |
getName()
Retrieves the name of the variable. |
int |
getNormalizedSize()
Retrieves the normalized size of this variable. |
java.lang.String |
getValue()
Retrieves the value of the variable. |
boolean |
isCategorical()
Determines if the variable is categorical. |
abstract int |
normalize(java.lang.String inValue,
double[] outArray,
int inx)
Converts the given symbol for use in the network. |
void |
setColumn(int col)
Sets the column. |
void |
setLabels(java.lang.String Labels)
Sets the labels using the given label string. |
void |
setValue(java.lang.String val)
Sets the value of the variable. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.lang.String name
protected java.lang.String value
protected int column
protected java.util.Vector labels
Constructor Detail |
public Variable()
Variable
.public Variable(java.lang.String name)
Variable
with the given name.name
- the String that contains the name of the variableMethod Detail |
public java.lang.String getName()
public void setValue(java.lang.String val)
val
- the String value of the variablepublic java.lang.String getValue()
public void setLabels(java.lang.String Labels)
labels
- the String that contains the labels for a categorical variableLabels
- the Stringpublic java.lang.String getLabel(int index)
index
- the integer index of the desired labelpublic java.lang.String getLabels()
public int getIndex(java.lang.String label)
label
- the String for which the index is retrievedpublic boolean isCategorical()
true if the variable is categorical. Otherwise, returns
false
- Returns:
- the boolean
public void setColumn(int col)
col
- the integer value of the columnpublic abstract void computeStatistics(java.lang.String inValue)
inValue
- the String on which the statistics are basedpublic abstract int normalize(java.lang.String inValue, double[] outArray, int inx)
inValue
- the String to be convertedoutArray
- the double array of converted valuesinx
- the integer index that indicates where the converted output
is to be stored in the arraypublic int getNormalizedSize()
public java.lang.String getDecodedValue(double[] act, int index)
act
- the double[]index
- the int
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |