C# Class Accord.Neuro.DistanceNeuron

Inheritance: Neuron
Mostra file Open project: accord-net/framework Class Usage Examples

Public Methods

Method Description
Compute ( double input ) : double

Computes output value of neuron.

The output value of distance neuron is equal to the distance between its weights and inputs - sum of absolute differences. The output value is also stored in Output property.

The method may be called safely from multiple threads to compute neuron's output value for the specified input values. However, the value of Neuron.Output property in multi-threaded environment is not predictable, since it may hold neuron's output computed from any of the caller threads. Multi-threaded access to the method is useful in those cases when it is required to improve performance by utilizing several threads and the computation is based on the immediate return value of the method, but not on neuron's output property.

DistanceNeuron ( int inputs ) : System

Initializes a new instance of the DistanceNeuron class.

Method Details

Compute() public method

Computes output value of neuron.

The output value of distance neuron is equal to the distance between its weights and inputs - sum of absolute differences. The output value is also stored in Output property.

The method may be called safely from multiple threads to compute neuron's output value for the specified input values. However, the value of Neuron.Output property in multi-threaded environment is not predictable, since it may hold neuron's output computed from any of the caller threads. Multi-threaded access to the method is useful in those cases when it is required to improve performance by utilizing several threads and the computation is based on the immediate return value of the method, but not on neuron's output property.

Wrong length of the input vector, which is not /// equal to the expected value.
public Compute ( double input ) : double
input double Input vector.
return double

DistanceNeuron() public method

Initializes a new instance of the DistanceNeuron class.
public DistanceNeuron ( int inputs ) : System
inputs int Neuron's inputs count.
return System