SOM neural network help - for classifying data- yes, it can be done
조회 수: 1 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
채택된 답변
Greg Heath
2012년 3월 13일
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
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!