org.encog.mathutil
Class Equilateral
- java.lang.Object
-
- org.encog.mathutil.Equilateral
-
- All Implemented Interfaces:
- java.io.Serializable
public class Equilateral extends java.lang.Object implements java.io.SerializableUsed 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
Fields Modifier and Type Field and Description static intMIN_EQThe minimum number of fields to use equilateral encoding.
-
Constructor Summary
Constructors Constructor and Description Equilateral(int count, double high, double low)Construct an equilateral matrix.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intdecode(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.doublegetDistance(double[] data, int set)Get the Euclidean distance between the specified data and the set number.
-
-
-
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.
-
-
DMelt 3.0 © DataMelt by jWork.ORG