C# 클래스 Accord.Neuro.Learning.BackPropagationLearning

Back propagation learning algorithm.

The class implements back propagation learning algorithm, which is widely used for training multi-layer neural networks with continuous activation functions.

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 BackPropagationLearning teacher = new BackPropagationLearning( 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 // ... }
상속: ISupervisedLearning
파일 보기 프로젝트 열기: accord-net/framework 1 사용 예제들

공개 메소드들

메소드 설명
BackPropagationLearning ( ActivationNetwork network ) : System

Initializes a new instance of the BackPropagationLearning class.

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.

비공개 메소드들

메소드 설명
CalculateError ( double desiredOutput ) : double

Calculates error values for all neurons of the network.

CalculateUpdates ( double input ) : void

Calculate weights updates.

UpdateNetwork ( ) : void

Update network's weights.

메소드 상세

BackPropagationLearning() 공개 메소드

Initializes a new instance of the BackPropagationLearning class.
public BackPropagationLearning ( ActivationNetwork network ) : System
network ActivationNetwork Network to teach.
리턴 System

Run() 공개 메소드

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.
리턴 double

RunEpoch() 공개 메소드

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.
리턴 double