0% found this document useful (0 votes)
3 views

SOM Algorithm Aimad

Uploaded by

aimad baigouar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

SOM Algorithm Aimad

Uploaded by

aimad baigouar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Self Orginized Maps algorithm

I - Description and Goal of the algortithm


• Description

A self-organizing map (SOM) or self-organizing feature map (SOFM) is a type of artificial neural
network (ANN) that is trained using unsupervised learning to produce a low-dimensional (typically
two-dimensional), discretized representation of the input space of the training samples, called
a map, and is therefore a method to do dimensionality reduction.

Self-organizing maps differ from other artificial neural networks as they apply competitive learning as
opposed to error-correction learning (such as backpropagation with gradient descent), and in the
sense that they use a neighborhood function to preserve the topological properties of the input
space.
This makes SOMs useful for visualization by creating low-dimensional views of high-dimensional
data

• Goal
The goal of learning in the self-organizing map is to cause different parts of the network to
respond similarly to certain input patterns.

II - Structure and operations

Like most artificial neural networks, SOMs operate in two modes: training and mapping.
"Training" builds the map using input examples (a competitive process, also called vector
quantization), while "mapping" automatically classifies a new input vector.

The visible part of a self-organizing map is the map space, which consists of components called
nodes or neurons. The map space is defined beforehand, usually as a finite two-dimensional
region where nodes are arranged in a regular hexagonal or rectangular grid.[8] Each node is
associated with a "weight" vector, which is a position in the input space; that is, it has the same
dimension as each input vector. While nodes in the map space stay fixed, training consists in
moving weight vectors toward the input data (reducing a distance metric) without spoiling the
topology induced from the map space. Thus, the self-organizing map describes a mapping from a
higher-dimensional input space to a lower-dimensional map space. Once trained, the map can
classify a vector from the input space by finding the node with the closest (smallest distance
metric) weight vector to the input space vector.
Algorithm Learning Description

SOM Initialization

The weights of the neurons are initialized either to small random values or sampled evenly from
the subspace spanned by the two largest principal component eigenvectors. With the latter
alternative, learning is much faster because the initial weights already give a good approximation
of SOM weights.
Selection of a good initial approximation is a well-known problem for all iterative methods of
learning neural networks. Kohonen[13] used random initiation of SOM weights. Recently, principal
component initialization, in which initial map weights are chosen from the space of the first
principal components, has become popular due to the exact reproducibility of the results.

Training SOM
The training utilizes competitive learning. When a training example is fed to the network,
its Euclidean distance to all weight vectors is computed. The neuron whose weight vector is most
similar to the input is called the best matching unit (BMU). The weights of the BMU and neurons
close to it in the SOM grid are adjusted towards the input vector. The magnitude of the change
decreases with time and with the grid-distance from the BMU. The update formula for a neuron v
with weight vector Wv(s) is

where s is the step index, t an index into the training sample, u is the index of the BMU for the
input vector D(t), α(s) is a monotonically decreasing learning coefficient; Θ(u, v, s) is the
neighborhood function which gives the distance between the neuron u and the neuron v in step
s.[11] Depending on the implementations, t can scan the training data set systematically (t is 0, 1,
2...T-1, then repeat, T being the training sample's size), be randomly drawn from the data set
(bootstrap sampling), or implement some other sampling method (such as jackknifing).
Algorithm steps

1. Randomize the node weight vectors in a map (initialization of weights)

2. Randomly pick an input vector


3. Traverse each node in the map
1. Use the Euclidean distance formula to find the similarity between the input vector
and the map's node's weight vector
2. Track the node that produces the smallest distance (this node is the best
matching unit, BMU)
4. Update the weight vectors of the nodes in the neighborhood of the BMU (including the
BMU itself) by pulling them closer to the input vector

5. Increase and repeat from step 2 while


A variant algorithm:

1. Randomize the map's nodes' weight vectors


2. Traverse each input vector in the input data set
1. Traverse each node in the map
1. Use the Euclidean distance formula to find the similarity between the input
vector and the map's node's weight vector
2. Track the node that produces the smallest distance (this node is the best
matching unit, BMU)
2. Update the nodes in the neighborhood of the BMU (including the BMU itself) by
pulling them closer to the input vector

3. Increase and repeat from step 2 while

You might also like