I'm using the Kohonen package (see also self-organising-maps-for-customer-segmentation-using-r) for Self Organizing Maps (SOM), and I would like to know how to give weights for certain variables in the "Best Matching Unit" (BMU) in the map—the most similar node—finding process. How can I do this for some specific columns?

In other words, I want to remove the effect of some components on the organization map by setting its weight to 0. Removing those variables from the data without preamble is not an option because I need to find the "properties" of those variables.

  • $\begingroup$ I can't quite understand your question. Are you wanting to weight different variables differently in the training process, or in the prediction process? Have you considered the supersom? $\endgroup$ – Wayne May 3 '19 at 4:16

The simplest method would surely be to use the original copy of your data to find the 'properties'. Then make a copy of that data and set the necessary components / columns to zero, and use this altered data set to train the SOM.

If you want to weight a particular column more generally (i.e. not simply set it to zero), how you do that depends on the nature of the column, the other columns and how you are normalising the data. For example:

  • If all your data is always positive, e.g. sales figures or wind speed, you could weight a given column simply by multiplying it by the scale factor you wish to use.
  • For more general data, you could calculate the mean of the column, and then the difference between the mean and each value, and scale the data such that this difference is scaled by your chosen scale factor.

You would generally want to apply scaling factors after normalising your data, as otherwise, the normalisation may negate the effect of your scaling.

The original SOM-PAK by Kohonen himself allows you to scale specific vector columns, so it may be worth verifying any results you get from your R package against that. Variations in the actual implementation may lead to results which are different in detail, however.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.