How do I find the indices of the Self Organizing Map (SOM) training set output

H
herrysingh · May 14, 2021 · 2K views
Question
I'm using the SOM toolbox and have created the following: net = selforgmap([10 10)]; [net,tr] = train(net,inputs); where 'inputs' is a 5x10000 matrix of 5 parameters with 10000 samples.   using plotsomhits(net,inputs); shows how the 10000 samples are getting clustered.   Question: How do I output where each individual vector is clustered? For example where on the 10x10 grid is vector #1 located?
Expert Answer
Profile picture of Neeta Dsouza
Neeta Dsouza PhD Expert
Answered Nov 20, 2025
Here is an example that should help you:
 
 
net = selforgmap([10 10]);
[net,tr] = train(net,inputs); % Classify input data
op_som = vec2ind(net(inputs))';
for each input in inputs, op_som will have a numbering between 1 to n based on which cluster it belongs to.
 
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!