SOM neural network help - for classifying data- yes, it can be done

1 view (last 30 days)
I am following a paper to classify 3 sets of data. I am concentrating on Self-organising maps. Though supervised ones will be better. The only problem is that I am unable to get accurate results. While using nntool (gui) too, the results vary completely on successive trainings. Even the data which is used to construct the map, whn tested, hasnt been properly classifies by the map. I am using the following code after giving up on GUI::
L=250;
net=newsom(MVin,[1 2],'hextop','linkdist',L,2);
plotsom(net.iw{1,1},net.layers{1}.distances);
net.trainParam.epochs=200;
net.trainFcn='trainr';
net = train(net,MVin,Target);
a=vec2ind(sim(net,MVtest));
P=max(a);
n=0;
while(P==2)
n=n+1;
net=newsom(MVin,[1 2],'hextop','linkdist',L,2);
net.trainParam.epochs=200;
net.trainParam.show=Inf;
net.trainFcn='trainr';
net=train(net,MVin,Target);
a=vec2ind(sim(net,MVtest));
P=max(a);
end
n is for no of times training has been done P is set for 2, because the MVtest data belongs to 1 category Also this code is for calssifying only 2 sets for now.
The problem :1) it runs for 100 iterations even after specifying 200 2) It runs endlessly, cant cancel or stop!
I have also downloaded som-toolbox, but I am not familiar with the syntax of all the functions available. Help in this field will also be appreciated.
PS: please avail yourselves to me for counter questions. I shall be grateful.

Accepted Answer

Greg Heath
Greg Heath on 13 Mar 2012
Kohonen created SOM for visualization, not classification.
He extended SOM to LVQ for the purposes of classification.
Since LVQ has some obvious faults, he created LVQ2.
I suggest that you try LVQ and/or LVQ2.
Hope this helps.
Greg

More Answers (0)

Community Treasure Hunt

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

Start Hunting!