org.encog.mathutil
Class Equilateral

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

public class Equilateral
extends Object

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.


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
 

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 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 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 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.


Copyright © 2011. All Rights Reserved.