Suppose that I performed clustering of iris.data using SOM Toolbox in Matlab. After clustering, I have an input vector and I want to see which cluster this input belongs to? Any tips please on how to map an input pattern into a trained SOM map.
Asked
Active
Viewed 1,615 times
1

Amro
- 123,847
- 25
- 243
- 454

PhD Student
- 13
- 3
-
I am using ready tools like http://www.cis.hut.fi/ which I so not now how to see the best matching unit's weights in each cluster. – PhD Student Jul 17 '11 at 15:45
-
I haven't used this particular toolbox before, but if you post a minimum working example (MWE) of the code you have written so far, I might be able to help... – Amro Jul 17 '11 at 15:55
-
Here is an example of using SOM Toolbox from cis.hut.fi. `X = som_read_data('iris.data'); XNorm = som_normalize(X,'var'); SM = som_make(XNorm); som_show(SM,'umat');` I can see in the documentation (even for NNClustering tool in MATLAB) explanation about visulaization but cannot see how to save the resulted weights in the trained map? How can I see the associated samples with each cluster? And if I have an input pattern [4.9 3.1 1.5 0.1], how to decide which cluster is this input pattern into? – PhD Student Jul 17 '11 at 20:45
-
perhaps you are looking for the SOM_BMUS function: http://www.cis.hut.fi/somtoolbox/package/docs2/som_bmus.html – Amro Jul 17 '11 at 21:22
-
Thanks for the function, Amro. You have saved my time indeed. I will write a complete program and post the running code. – PhD Student Jul 18 '11 at 11:26
1 Answers
2
Once you have trained the SOM, you can classify a new input vector by assigning it to the nearest node in the grid (Best Matching Unit BMU) which have the closest weights. We predict the majority class of the training vectors belonging to that BMU node as the target class of the test instance.

Amro
- 123,847
- 25
- 243
- 454