0

I'm generating a self-organizing map in R using the kohonen package. However, when looking at the documentation, I cannot find a clear understanding of what the codes property of the som object represents.

The documentation only states:

codes: a matrix of code vectors.

What is a matrix of code vectors in this context?

lfalin
  • 4,219
  • 5
  • 31
  • 57
Kyle Ivoy
  • 77
  • 7

1 Answers1

2

If it works like other SOM packages do, I believe the code value you mention refers to codebook vectors. Here's a good resource that explains how those work:

The codebook vectors themselves represent prototypes (points) within the domain, whereas the topological structure imposes an ordering between the vectors during the training process.

From http://www.cleveralgorithms.com/nature-inspired/neural/som.html

I would recommend reading the original paper that accompanied the kohnen package, which you can find here: https://www.jstatsoft.org/article/view/v021i05/v21i05.pdf

It provides quite a bit more detail than the R-docs.

lfalin
  • 4,219
  • 5
  • 31
  • 57
  • Thank you so much! The original paper clarified a lot of things for me. – Kyle Ivoy Jun 09 '16 at 15:46
  • Sorry to ask again but I was just wondering how can the code book vector relate back to the original data we feed into the SOM during the training process? – Kyle Ivoy Jun 09 '16 at 16:30
  • Can you please take a look at this question? https://stackoverflow.com/questions/65864333/identifying-points-by-color – stats_noob Jan 24 '21 at 04:50