C# Class Encog.Neural.SOM.Training.Neighborhood.BestMatchingUnit

Show file Open project: encog/encog-silverlight-core Class Usage Examples

Public Methods

Method Description
BestMatchingUnit ( SOMNetwork som ) : System

Construct a BestMatchingUnit class. The training class must be provided.

CalculateBMU ( IMLData input ) : int

Calculate the best matching unit (BMU). This is the output neuron that has the lowest Euclidean distance to the input vector.

CalculateEuclideanDistance ( Matrix matrix, IMLData input, int outputNeuron ) : double

Calculate the Euclidean distance for the specified output neuron and the input vector. This is the square root of the squares of the differences between the weight and input vectors.

Reset ( ) : void

Reset the "worst distance" back to a minimum value. This should be called for each training iteration.

Method Details

BestMatchingUnit() public method

Construct a BestMatchingUnit class. The training class must be provided.
public BestMatchingUnit ( SOMNetwork som ) : System
som Encog.Neural.SOM.SOMNetwork The SOM to evaluate.
return System

CalculateBMU() public method

Calculate the best matching unit (BMU). This is the output neuron that has the lowest Euclidean distance to the input vector.
public CalculateBMU ( IMLData input ) : int
input IMLData The input vector.
return int

CalculateEuclideanDistance() public method

Calculate the Euclidean distance for the specified output neuron and the input vector. This is the square root of the squares of the differences between the weight and input vectors.
public CalculateEuclideanDistance ( Matrix matrix, IMLData input, int outputNeuron ) : double
matrix Matrix The matrix to get the weights from.
input IMLData The input vector.
outputNeuron int The neuron we are calculating the distance for.
return double

Reset() public method

Reset the "worst distance" back to a minimum value. This should be called for each training iteration.
public Reset ( ) : void
return void