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.mathutil
Class Equilateral

    java.lang.Object
      org.encog.mathutil.Equilateral

All Implemented Interfaces:
  Serializable

    public class Equilateral

extends Object
implements Serializable

Used to produce an array of activations to classify data into groups. This class is provided the number of groups, as well as the range that the activations should fall into.

See Also:
  Serialized Form

Field Summary
`static int` | `MIN_EQ` The minimum number of fields to use equilateral encoding.

Constructor Summary
`Equilateral(int count, double high, double low)` Construct an equilateral matrix.

Method Summary
`int` | `decode(double[] activations)` Decode a set of activations and see which set it has the lowest Euclidean distance from.
`double[]` | `encode(int set)` Get the activations for the specified set.
`double` | `getDistance(double[] data, int set)` Get the Euclidean distance between the specified data and the set number.

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

Field Detail

### MIN_EQ

    public static final int MIN_EQ

  The minimum number of fields to use equilateral encoding.

  See Also:
    Constant Field Values

Constructor Detail

### Equilateral

    public Equilateral(int count,
                       double high,
                       double low)

  Construct an equilateral matrix.

  Parameters:
    `count` - The number of sets, these will be the rows in the matrix.
    `high` - The high value for the outputs.
    `low` - The low value for the outputs.

Method Detail

### decode

    public final int decode(double[] activations)

  Decode a set of activations and see which set it has the lowest Euclidean distance from.

  Parameters:
    `activations` - The output from the neural network.
  Returns:
    The set that these activations were closest too.

### encode

    public final double[] encode(int set)

  Get the activations for the specified set.

  Parameters:
    `set` - The set to determine the activations for.
  Returns:
    The activations for the specified sets.

### getDistance

    public final double getDistance(double[] data,
                                    int set)

  Get the Euclidean distance between the specified data and the set number.

  Parameters:
    `data` - The data to check.
    `set` - The set to check.
  Returns:
    The distance.

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.