org.encog.util.normalize.input
Class BasicInputField
- java.lang.Object
-
- org.encog.util.normalize.input.BasicInputField
-
- All Implemented Interfaces:
- java.io.Serializable, InputField
- Direct Known Subclasses:
- InputFieldArray1D, InputFieldArray2D, InputFieldCSV, InputFieldEncogCollection, InputFieldMLDataSet
public class BasicInputField extends java.lang.Object implements InputField
Provides basic functionality, such as min/max and current value for other input fields.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description BasicInputField()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidapplyMinMax(double d)Given the current value, apply to the min and max values.doublegetCurrentValue()doublegetMax()doublegetMin()booleangetUsedForNetworkInput()doublegetValue(int i)Not supported for this sort of class, may be implemented in subclasses.voidsetCurrentValue(double currentValue)Set the current value of this field.voidsetMax(double max)Set the current max value.voidsetMin(double min)Set the current min value.voidsetUsedForNetworkInput(boolean usedForNetworkInput)This is needed so that the buildForNetworkInput method of the normalization class knows how many input fields to expect.
-
-
-
Method Detail
-
applyMinMax
public void applyMinMax(double d)
Given the current value, apply to the min and max values.- Specified by:
applyMinMaxin interfaceInputField- Parameters:
d- THe current value.
-
getCurrentValue
public double getCurrentValue()
- Specified by:
getCurrentValuein interfaceInputField- Returns:
- The current value of the input field. This is only valid, while the normalization is being performed.
-
getMax
public double getMax()
- Specified by:
getMaxin interfaceInputField- Returns:
- The maximum value for all of the input data, this is calculated during the first pass of normalization.
-
getMin
public double getMin()
- Specified by:
getMinin interfaceInputField- Returns:
- The minimum value for all of the input data, this is calculated during the first pass of normalization.
-
getUsedForNetworkInput
public boolean getUsedForNetworkInput()
- Specified by:
getUsedForNetworkInputin interfaceInputField- Returns:
- True, if this field is used for network input. This is needed so that the buildForNetworkInput method of the normalization class knows how many input fields to expect. For instance, fields used only to segregate data are not used for the actual network input and may not be provided when the network is actually being queried.
-
getValue
public double getValue(int i)
Not supported for this sort of class, may be implemented in subclasses. Will throw an exception.- Specified by:
getValuein interfaceInputField- Parameters:
i- The index. Not used.- Returns:
- The value at the specified index.
-
setCurrentValue
public void setCurrentValue(double currentValue)
Set the current value of this field. This value is only valid while the normalization is occurring.- Specified by:
setCurrentValuein interfaceInputField- Parameters:
currentValue- The current value of this field.
-
setMax
public void setMax(double max)
Set the current max value.- Specified by:
setMaxin interfaceInputField- Parameters:
max- The maximum value encountered on this field so far.
-
setMin
public void setMin(double min)
Set the current min value.- Specified by:
setMinin interfaceInputField- Parameters:
min- The minimum value encountered on this field so far.
-
setUsedForNetworkInput
public void setUsedForNetworkInput(boolean usedForNetworkInput)
This is needed so that the buildForNetworkInput method of the normalization class knows how many input fields to expect. For instance, fields used only to segregate data are not used for the actual network input and may not be provided when the network is actually being queried.- Parameters:
usedForNetworkInput- True, if this field is used for network input.
-
-
DMelt 3.0 © DataMelt by jWork.ORG