Documentation of 'org.encog.util.normalize.output.mapped.OutputFieldEncode' Java class
OutputFieldEncode
org.encog.util.normalize.output.mapped

Class OutputFieldEncode

  • All Implemented Interfaces:
    java.io.Serializable, OutputField


    public class OutputFieldEncode
    extends BasicOutputField
    An encoded output field. This allows ranges of output values to be mapped to specific values.
    See Also:
    Serialized Form
    • Constructor Detail

      • OutputFieldEncode

        public OutputFieldEncode(InputField sourceField)
        Construct an encoded field.
        Parameters:
        sourceField - The field that this is based on.
    • Method Detail

      • addRange

        public void addRange(double low,
                             double high,
                             double value)
        Add a ranged mapped to a value.
        Parameters:
        low - The low value for the range.
        high - The high value for the range.
        value - The value that the field should produce for this range.
      • calculate

        public double calculate(int subfield)
        Calculate the value for this field.
        Parameters:
        subfield - Not used.
        Returns:
        Return the value for the range the input falls within, or return the catchall if nothing matches.
      • getCatchAll

        public double getCatchAll()
        Returns:
        The catch all value that will be returned if nothing matches.
      • getSourceField

        public InputField getSourceField()
        Returns:
        The source field.
      • getSubfieldCount

        public int getSubfieldCount()
        Returns:
        Return 1, no subfield supported.
      • rowInit

        public void rowInit()
        Not needed for this sort of output field.
      • setCatchAll

        public void setCatchAll(double catchAll)
        Set the catch all value.
        Parameters:
        catchAll - The catch all value that is to be returned if none of the ranges match.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.