Borrar filtros
Borrar filtros

Self Organizing Map (SOM) recognising 'unseen' data - Kohonen's SOM

2 visualizaciones (últimos 30 días)
Hi, Having successfully employed Kohonen's SOM (ver 1)for classification (as in I managed to classify training data such that the Best Matching Neuron is correctly associated with all data that have similar features). I now want to use this saved SOM to correctly recognise 'unseen' data without re-training the SOM again.
I understand some might be of the view that Kohonen's SOM is good for visualisation only. But if my experiment with classification worked, as described above, surely there should be a way to use this trained map to recognise 'new' data and accordingly exhibit which Neuron it is best associated with.
Hence would it be possible for someone familar with the SOM-PAK code to help me with this. Below is what I have tried but it does not work as intended.
load('SOM_trained.mat') % this contains the trained SOM and all other variables
B = xlsread('newdata.xlsx'); % this reads the new data into an array
m = (num_A+1); %this increments the max data size of the trained SOM by one, num_A was the max size and is contained int he loaded .mat file
sDataStr_rec = som_data_struct(B);
sDataStr_rec=som_normalize_data(sDataStr_rec,'som_var_norm');
sMaptest = som_train(sMaptest,sDataStr_rec, 500); %SMaptest is the Trained SOM loaded from the .mat file
som_show(sMaptest,1);
for p = 1:m
sDataStr_rec.labels{p} = strcat(num2str(m)); %Associating an Index number for each input
end
sMapnew=som_autolabel(sMaptest,sDataStr_rec,'add');
som_addlabels(sMapnew,'all','all',[],'k');
colormap(jet(12));
som_recolorbar
X = size (sMapnew.labels,2);
Y = size (sMapnew.labels,1);
rec_bmu = som_bmus(sMapnew, sDataStr_rec);
At this point rec_bmu should to point to the the Best Matched Neuron for the new 'unseen' data. This does not happen. Can anyone figure out my mistake.
Thanks.

Respuesta aceptada

Vineet Guru
Vineet Guru el 1 de Jun. de 2013
I have sorted this out.
Many thanks for those who attempted an answer.

Más respuestas (0)

Categorías

Más información sobre Sequence and Numeric Feature Data Workflows en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by