DEV Community

Cover image for Self Organizing Maps (SOMs)
Dana
Dana

Posted on

Self Organizing Maps (SOMs)

  • Self Organizing Map or Kohonen Map or SOM is a type of Artificial Neural Network which is also inspired by biological models of neural systems.
  • It follows an unsupervised learning approach and trained its network through a competitive learning algorithm.
  • SOM is used for clustering and mapping (dimensionality reduction) techniques to map multidimensional data onto lower-dimensional which allows people to reduce complex problems for easy interpretation.
  • SOM has two layers one is the Input layer and the other one is the Output layer.

How do SOM works?

wij = wij(old) + alpha(t) * (xik - wij(old))

  • alpha is a learning rate at time t
  • j denotes the winning vector
  • i denotes the ith feature of training example
  • k denotes the kth training example from the input data

After training the SOM network, trained weights are used for clustering new examples. A new example falls in the cluster of winning vectors.

Train the algorithm

  1. Initialize the weights wij random value may be assumed. Initialize the learning rate α.
  2. Calculate squared Euclidean distance.

    D(j) = Σ (wij – xi)^2

    • i=1 to n
    • j=1 to m
  3. Find index J, when D(j) is minimum that will be considered as winning index.

  4. For each j within a specific neighborhood of j and for all i, calculate the new weight.

    wij(new)=wij(old) + α[xi – wij(old)]

  5. Update the learning rule

    α(t+1) = 0.5 * t

  6. Test the Stopping Condition.

Top comments (0)