Overview of Self-Organizing Maps
Self-Organizing Maps (SOMs), introduced by Teuvo Kohonen, are a type of unsupervised neural network used for clustering and visualizing high-dimensional data. This blog provides a detailed explanation of SOMs, including their mathematical foundations and a practical Python implementation.
Introduction to Self-Organizing Maps
SOMs organize data points into a grid of neurons (nodes) based on their similarities. This process helps in clustering and visualizing data by mapping it from a high-dimensional space to a lower-dimensional grid, usually two dimensions.
Mechanism of SOMs
- Initialization: Neurons in the grid are initialized with random weight vectors.
- Competition: For each input data point, the neuron with the closest weight vector to the input (known as the Best Matching Unit, BMU) is identified.
- Cooperation: The weights of the BMU and its neighboring neurons are adjusted to become more similar to the input data point.
- Adaptation: The influence of the BMU and its neighbors decreases over time, typically controlled by a decaying learning rate and neighborhood radius.
1. Distance Calculation
To identify the BMU, we calculate the Euclidean distance between the input vector x and the weight vector wj of each neuron j:
where:
- x is the input vector.