org.encog.util.normalize.input
Interface InputField

All Superinterfaces:
Serializable
All Known Implementing Classes:
BasicInputField, InputFieldArray1D, InputFieldArray2D, InputFieldCSV, InputFieldCSVText, InputFieldEncogCollection, InputFieldMLDataSet

public interface InputField
extends Serializable

A Normalization input field. This field defines data that needs to be normalized. There are many different types of normalization field that can be used for many different purposes. To assist in normalization each input file tracks the min and max values for that field.


Method Summary
 void applyMinMax(double d)
          Update the min and max values for this field with the specified values.
 double getCurrentValue()
           
 double getMax()
           
 double getMin()
           
 boolean getUsedForNetworkInput()
           
 double getValue(int i)
          Called for input field types that require an index to get the current value.
 void setCurrentValue(double d)
          Set the current value of this field.
 void setMax(double max)
          Set the current max value.
 void setMin(double min)
          Set the current min value.
 

Method Detail

applyMinMax

void applyMinMax(double d)
Update the min and max values for this field with the specified values.

Parameters:
d - The current value to use to update min and max.

getCurrentValue

double getCurrentValue()
Returns:
The current value of the input field. This is only valid, while the normalization is being performed.

getMax

double getMax()
Returns:
The maximum value for all of the input data, this is calculated during the first pass of normalization.

getMin

double getMin()
Returns:
The minimum value for all of the input data, this is calculated during the first pass of normalization.

getUsedForNetworkInput

boolean getUsedForNetworkInput()
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

double getValue(int i)
Called for input field types that require an index to get the current value. This is used by the InputFieldArray1D and InputFieldArray2D classes.

Parameters:
i - The index to read.
Returns:
The value read.

setCurrentValue

void setCurrentValue(double d)
Set the current value of this field. This value is only valid while the normalization is occurring.

Parameters:
d - The current value of this field.

setMax

void setMax(double max)
Set the current max value.

Parameters:
max - The maximum value encountered on this field so far.

setMin

void setMin(double min)
Set the current min value.

Parameters:
min - The minimum value encountered on this field so far.


Copyright © 2014. All Rights Reserved.