> For the complete documentation index, see [llms.txt](https://statduck.gitbook.io/statduck/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://statduck.gitbook.io/statduck/esl/unsupervised-learning/self-organized-map.md).

# Self-Organized Map

&#x20;   SOM is the way that our prototypes are project onto one or two dimensional space. $$K$$ prototypes $$m\_j \in \mathbb{R}^p, ;j=1,...,K$$ are parametrized with respect to an integer coordinate pair $$l\_j \in Q\_1\times Q\_2, ; Q\_1={1,2,...,q\_1},;Q\_2={1,2,...,q\_2},;K=q\_1\cdot q\_2$$.  In this setting, prototypes can be viewed as "buttons" on **the principal component plane** in a regular pattern. At first, the prototypes $$m\_j$$ are initialized, and these are updated. For all neighbors $$m\_k$$ of the closest prototype $$m\_j$$ to $$x\_i$$, we have $$m\_k$$ move toward $$x\_i$$ via this update.

$$
m\_k \leftarrow m\_k+\alpha(x\_i-m\_k)
$$

&#x20;   The neighbors of $$m\_j$$ are defined to be all $$m\_k$$ such that the distance between $$l\_j$$ and $$l\_k$$ is small. The small is determined by a threshold $$r$$. This distance is defined in the space $$Q\_1 \times Q\_2$$. The sophisticated version is as follows.

$$
m\_k \leftarrow m\_k +\alpha h(||l\_j-l\_k||)(x\_i-m\_k)
$$

&#x20;   If we set the threshold $$r$$ small enough so that each neighborhood contains only one point, then the spatial connection between prototypes is lost. In that case SOM algorithms becomes an online version of K-means clustering. Thus, we can call SOM a constraint version of K-means, and the constraint is that the prototypes are projected on lower dimension.

![](https://1943863620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZyJM_SVjd9SJ3tuTbA%2Fuploads%2FzZn6j3QtBdPE1hAW3QFk%2Fimage.png?alt=media\&token=17142cd3-8480-421b-87d5-2b7b17319835)

![](https://1943863620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZyJM_SVjd9SJ3tuTbA%2Fuploads%2F0bu0UT88PjlU3nPEIHeV%2Fimage.png?alt=media\&token=32fbe2e6-c9cc-4cc4-afff-71556ab33d10)
