C# Class Accord.Neuro.Learning.ParallelResilientBackpropagationLearning

Resilient Backpropagation learning algorithm.

This class implements the resilient backpropagation (RProp) learning algorithm. The RProp learning algorithm is one of the fastest learning algorithms for feed-forward learning networks which use only first-order information.

Sample usage (training network to calculate XOR function):

// initialize input and output values double[][] input = new double[4][] { new double[] {0, 0}, new double[] {0, 1}, new double[] {1, 0}, new double[] {1, 1} }; double[][] output = new double[4][] { new double[] {0}, new double[] {1}, new double[] {1}, new double[] {0} }; // create neural network ActivationNetwork network = new ActivationNetwork( SigmoidFunction( 2 ), 2, // two inputs in the network 2, // two neurons in the first layer 1 ); // one neuron in the second layer // create teacher ResilientBackpropagationLearning teacher = new ResilientBackpropagationLearning( network ); // loop while ( !needToStop ) { // run epoch of learning procedure double error = teacher.RunEpoch( input, output ); // check error value to see if we need to stop // ... }
Inheritance: ISupervisedLearning, IDisposable
Afficher le fichier Open project: accord-net/framework Class Usage Examples

Méthodes publiques

Méthode Description
ComputeError ( double input, double output ) : double

Compute network error for a given data set.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

ParallelResilientBackpropagationLearning ( ActivationNetwork network ) : System

Initializes a new instance of the ParallelResilientBackpropagationLearning class.

Reset ( double rate ) : void

Resets the current update steps using the given learning rate.

Run ( double input, double output ) : double

Runs learning iteration.

Runs one learning iteration and updates neuron's weights.

RunEpoch ( double input, double output ) : double

Runs learning epoch.

The method runs one learning epoch, by calling Run method for each vector provided in the input array.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources

Private Methods

Méthode Description
CalculateError ( double desiredOutput ) : double

Calculates error values for all neurons of the network.

CalculateGradient ( double input ) : void

Computes the gradient for a given input.

ResetGradient ( ) : void

Resets the gradient vector back to zero.

UpdateNetwork ( bool errIncrease = false ) : void

Update network weights.

Method Details

ComputeError() public méthode

Compute network error for a given data set.
public ComputeError ( double input, double output ) : double
input double The input points.
output double The output points.
Résultat double

Dispose() public méthode

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Releases unmanaged and - optionally - managed resources
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed /// and unmanaged resources; false to release only unmanaged /// resources.
Résultat void

ParallelResilientBackpropagationLearning() public méthode

Initializes a new instance of the ParallelResilientBackpropagationLearning class.
public ParallelResilientBackpropagationLearning ( ActivationNetwork network ) : System
network AForge.Neuro.ActivationNetwork Network to teach.
Résultat System

Reset() public méthode

Resets the current update steps using the given learning rate.
public Reset ( double rate ) : void
rate double
Résultat void

Run() public méthode

Runs learning iteration.

Runs one learning iteration and updates neuron's weights.

public Run ( double input, double output ) : double
input double Input vector.
output double Desired output vector.
Résultat double

RunEpoch() public méthode

Runs learning epoch.

The method runs one learning epoch, by calling Run method for each vector provided in the input array.

public RunEpoch ( double input, double output ) : double
input double Array of input vectors.
output double Array of output vectors.
Résultat double