C# 클래스 AForge.Neuro.Learning.SOMLearning

Kohonen Self Organizing Map (SOM) learning algorithm.

This class implements Kohonen's SOM learning algorithm and is widely used in clusterization tasks. The class allows to train Distance Networks.

Sample usage (clustering RGB colors):

// set range for randomization neurons' weights Neuron.RandRange = new Range( 0, 255 ); // create network DistanceNetwork network = new DistanceNetwork( 3, // thress inputs in the network 100 * 100 ); // 10000 neurons // create learning algorithm SOMLearning trainer = new SOMLearning( network ); // network's input double[] input = new double[3]; // loop while ( !needToStop ) { input[0] = rand.Next( 256 ); input[1] = rand.Next( 256 ); input[2] = rand.Next( 256 ); trainer.Run( input ); // ... // update learning rate and radius continuously, // so networks may come steady state }
상속: IUnsupervisedLearning
파일 보기 프로젝트 열기: holisticware-admin/MonoVersal.AForgeNET 1 사용 예제들

공개 메소드들

메소드 설명
Run ( double input ) : double

Runs learning iteration.

The method runs one learning iterations - finds winner neuron (the neuron which has weights with values closest to the specified input vector) and updates its weight (as well as weights of neighbor neurons) in the way to decrease difference with the specified input vector.

RunEpoch ( double input ) : double

Runs learning epoch.

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

SOMLearning ( DistanceNetwork network ) : System

Initializes a new instance of the SOMLearning class.

This constructor supposes that a square network will be passed for training - it should be possible to get square root of network's neurons amount.

SOMLearning ( DistanceNetwork network, int width, int height ) : System

Initializes a new instance of the SOMLearning class.

The constructor allows to pass network of arbitrary rectangular shape. The amount of neurons in the network should be equal to width * height.

메소드 상세

Run() 공개 메소드

Runs learning iteration.

The method runs one learning iterations - finds winner neuron (the neuron which has weights with values closest to the specified input vector) and updates its weight (as well as weights of neighbor neurons) in the way to decrease difference with the specified input vector.

public Run ( double input ) : double
input double Input 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
input double Array of input vectors.
리턴 double

SOMLearning() 공개 메소드

Initializes a new instance of the SOMLearning class.

This constructor supposes that a square network will be passed for training - it should be possible to get square root of network's neurons amount.

Invalid network size - square network is expected.
public SOMLearning ( DistanceNetwork network ) : System
network DistanceNetwork Neural network to train.
리턴 System

SOMLearning() 공개 메소드

Initializes a new instance of the SOMLearning class.
The constructor allows to pass network of arbitrary rectangular shape. The amount of neurons in the network should be equal to width * height.
Invalid network size - network size does not correspond /// to specified width and height.
public SOMLearning ( DistanceNetwork network, int width, int height ) : System
network DistanceNetwork Neural network to train.
width int Neural network's width.
height int Neural network's height.
리턴 System