**Prerequisite:** ANN | Self Organizing Neural Network (SONN)

In the Self Organizing Neural Network (SONN), learning is performed by shifting the weights from inactive connections to active ones. The neurons which were won are selected to learn along with their neighborhood neurons. If a neuron does not respond for a specific input pattern, then learning will not be performed in that particular neuron.

**Self-Organizing Neural Network Learning Algorithm:**

**Step 0:**

- Initialize synaptic weights to random values in a specific interval like, [-1, 1] or [0, 1].
- Assign topological neighborhood parameters.
- Define learning rate (say, 0.1).

* Step 1:* Until termination condition is reached, do loop:

**Steps 2-8**

*For randomly chosen input vector from the set of training samples, do loop:*

**Step 2:****Steps 3-5**.

*Synaptic weight vector of the winning neuron for the input vector . For each , Euclidean Distance is calculated between a pair of (n X 1) vectors and is represented by-*

**Step 3:**

This is a criteria to finding similarity between two sets of samples. The nodes (neurons) in the network are evaluated to determine the most likely input vector according to its weights

*To select the winning neuron, , that best matches the input vector , so that the is minimum.*

**Step 4:**

Where: is the number of neurons in the input layer,

is the number of neurons in the Kohonen layer.

The winning node is generally termed as the Best Matching Unit (BMU).

*Now it is the Learning phase; to update the synaptic weights. For all nodes within the neighborhood of that neuron, for every :*

**Step 5:**

Where is the weight correction at iteration .

This process to update weight is based on the competitive learning rule:

Where is the learning rate.

Here the neighborhood function centered around the winner-takes-all neuron at iteration . Any neurons within the radius of the BMU are modified to make them more similar to the input vector.

*Update the learning rate . Following the equation-*

**Step 6:**

*At specified times reduce radius of topological neighborhood BMU. As per the clustering process progresses, the radius of the neighborhood around a cluster unit also decreases accordingly.*

**Step 7:***Check for the termination condition.*

**Step 8:**

**Example with iterations:**

Take an input vector of 2 – Dimension:

- The initial weight vectors, , are given by
- We find the winning (best-matching) neuron satisfying the minimum distance Euclidean criterion:
- Neuron 3 is the winner and its weight vector is updated following the competitive learning rule.
- The updated weight vector at iteration is calculated as:
- The weight vector of the winning neuron 3 becomes closer to the input vector in each iteration.