Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.encog.util.normalize.output.nominal
Class OutputEquilateral

    java.lang.Object
      org.encog.util.normalize.output.BasicOutputField
          org.encog.util.normalize.output.nominal.OutputEquilateral

All Implemented Interfaces:
  Serializable, OutputField

    public class OutputEquilateral

extends BasicOutputField

Allows nominal items to be encoded using the equilateral method. This maps the nominal items into an array of input or output values minus 1. This can sometimes provide a more accurate representation than the "one of" method. Based on: Guiver and Klimasauskas (1991).

See Also:
  Serialized Form

Constructor Summary
`OutputEquilateral()` Prodvide a default constructor for reflection.
`OutputEquilateral(double low, double high)` Create an equilateral output field with the specified high and low output values.

Method Summary
`void` | `addItem(InputField inputField, double value)` Add a nominal value based on a single value.
`void` | `addItem(InputField inputField, double low, double high)` Add a nominal item based on a range.
`double` | `calculate(int subfield)` Calculate the value for the specified subfield.
`Equilateral` | `getEquilateral()`
`double` | `getHigh()`
`double` | `getLow()`
`int` | `getSubfieldCount()` This is the total number of nominal items minus 1.
`void` | `rowInit()` Determine which item's index is the value.

Methods inherited from class org.encog.util.normalize.output.BasicOutputField
`isIdeal, setIdeal`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### OutputEquilateral

    public OutputEquilateral()

  Prodvide a default constructor for reflection.

### OutputEquilateral

    public OutputEquilateral(double low,
                             double high)

  Create an equilateral output field with the specified high and low output values. These will often be 0 to 1 or -1 to 1.

  Parameters:
    `high` - The high output value.
    `low` - The low output value.

Method Detail

### addItem

    public void addItem(InputField inputField,
                        double value)

  Add a nominal value based on a single value. This creates a 0.1 range around this value.

  Parameters:
    `inputField` - The input field this is based on.
    `value` - The value.

### addItem

    public void addItem(InputField inputField,
                        double low,
                        double high)

  Add a nominal item based on a range.

  Parameters:
    `inputField` - The input field to use.
    `low` - The low value of the range.
    `high` - The high value of the range.

### calculate

    public double calculate(int subfield)

  Calculate the value for the specified subfield.

  Parameters:
    `subfield` - The subfield to calculate for.
  Returns:
    The calculated value.

### getEquilateral

    public Equilateral getEquilateral()

  Returns:
    The equalateral table being used.

### getHigh

    public double getHigh()

  Returns:
    The high value of the range.

### getLow

    public double getLow()

  Returns:
    The low value of the range.

### getSubfieldCount

    public int getSubfieldCount()

  This is the total number of nominal items minus 1.

  Returns:
    The number of subfields.

### rowInit

    public void rowInit()

  Determine which item's index is the value.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011. All Rights Reserved.