learn
Class ContinuousVariable
java.lang.Object
|
+--learn.Variable
|
+--learn.ContinuousVariable
- class ContinuousVariable
- extends Variable
- implements java.io.Serializable
The ContinuousVariable
class provides the support necessary
for variables that can take on real, continuous values within a defined range.
- See Also:
- Serialized Form
Field Summary |
protected double |
max
|
protected double |
min
|
Constructor Summary |
ContinuousVariable(java.lang.String name)
Creates a ContinuousVariable with the given name. |
Method Summary |
void |
computeStatistics(java.lang.String inValue)
Used within a DataSet to Compute the minimum and maximum value
for the variable, based on the given value. |
int |
normalize(java.lang.String inStrValue,
double[] outArray,
int inx)
Linearly scales a value to be in the range from 0.0 to 1.0. |
void |
setMax(double Max)
Sets the maximum value for the variable. |
void |
setMin(double min)
Sets the minimum value for the variable. |
Methods inherited from class learn.Variable |
getDecodedValue,
getIndex,
getLabel,
getLabels,
getName,
getNormalizedSize,
getValue,
isCategorical,
setColumn,
setLabels,
setValue |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
min
protected double min
max
protected double max
ContinuousVariable
public ContinuousVariable(java.lang.String name)
- Creates a
ContinuousVariable
with the given name.
- Parameters:
name
- the String name that identifies the variable
setMin
public void setMin(double min)
- Sets the minimum value for the variable.
- Parameters:
min
- the double minimum value for the variable
setMax
public void setMax(double Max)
- Sets the maximum value for the variable.
- Parameters:
max
- the double maximum value for the variableMax
- the double
computeStatistics
public void computeStatistics(java.lang.String inValue)
- Used within a
DataSet
to Compute the minimum and maximum value
for the variable, based on the given value.
- Parameters:
inValue
- the String that contains the value used to determine minimum
or maximum value for the variable.- Overrides:
- computeStatistics in class Variable
normalize
public int normalize(java.lang.String inStrValue,
double[] outArray,
int inx)
- Linearly scales a value to be in the range from 0.0 to 1.0.
- Parameters:
inStrValue
- the String representation of the value to be scaledoutArray
- the double array of scaled valuesinx
- the index of the array element where the scaled value
is stored- Returns:
- the next index value
- Overrides:
- normalize in class Variable