# One-hot encoding for SOM

I have a question regarding how I should convert categorical data to numerical data. I'm using this kdd99cup intrusion detection dataset, which has a 41 attributes and class label is the type of attacks. I need to feed this dataset to self-organizing map because I want to gauge how difficult it is for an unsupervised algorithm to group data of the same class together. The problem is some of the columns have categorical data but if I use one-hot encoding, the number of dimensions increases to around 120 and I heard that SOM does not work well if the dimension is too large. How should I deal with these categorical attributes?

• regularization -- I have no experience with using self-organizing maps, but most of the machine learning algorithms have some ways of regularizing them (see ), e.g. by using $$L_1$$ or $$L_2$$ penalties, dropout, etc,