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 OutputOneOf

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

All Implemented Interfaces:
  Serializable, OutputField

    public class OutputOneOf

extends BasicOutputField

An output field that uses the "on of" technique to represent input data. For example, if there were five nominal items, or classes, given then each one would be represented by a single output neuron that would be on or off. Often the OutputEquilateral class is a better choice to represent nominal items.

See Also:
  Serialized Form

Constructor Summary
`OutputOneOf()` Default constructor for reflection.
`OutputOneOf(double trueValue, double falseValue)` Construct a one-of field and specify the true and false value.

Method Summary
`void` | `addItem(InputField inputField, double value)` Add a nominal value specifying a single value, the high and low values will be 0.5 below and 0.5 above.
`void` | `addItem(InputField inputField, double low, double high)` Add a nominal item, specify the low and high values.
`double` | `calculate(int subfield)` Calculate the value for the specified subfield.
`double` | `getFalseValue()`
`int` | `getSubfieldCount()`
`double` | `getTrueValue()`
`void` | `rowInit()` Not needed for this sort of output field.

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

### OutputOneOf

    public OutputOneOf()

  Default constructor for reflection.

### OutputOneOf

    public OutputOneOf(double trueValue,
                       double falseValue)

  Construct a one-of field and specify the true and false value.

  Parameters:
    `trueValue` - The true value.
    `falseValue` - The false value.

Method Detail

### addItem

    public void addItem(InputField inputField,
                        double value)

  Add a nominal value specifying a single value, the high and low values will be 0.5 below and 0.5 above.

  Parameters:
    `inputField` - The input field to use.
    `value` - The value to calculate the high and low values off of.

### addItem

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

  Add a nominal item, specify the low and high values.

  Parameters:
    `inputField` - The input field to base everything from.
    `low` - The high value for this nominal item.
    `high` - The low value for this nominal item.

### calculate

    public double calculate(int subfield)

  Calculate the value for the specified subfield.

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

### getFalseValue

    public double getFalseValue()

  Returns:
    The false value.

### getSubfieldCount

    public int getSubfieldCount()

  Returns:
    The number of subfields, or nominal classes.

### getTrueValue

    public double getTrueValue()

  Returns:
    The true value.

### rowInit

    public void rowInit()

  Not needed for this sort of output field.

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.