I have tried two years to plot Som map (self-organizing map);but I can't do it with matlab
this is my program (I want plot the position of the input [1 0] in the map) please help me
I have read help plotsom, doc , nothing to do this
p1=[1 1]'; p2=[1 2]'; p3=[2 -1]'; p4=[2 -2]'; p5=[-1 2]'; p6=[-2 1]'; p7=[-1 -1]'; p8=[-2 -2]';
P=[p1 p2 p3 p4 p5 p6 p7 p8];
% Create a Self-Organizing Map
dimension1 = 10;
dimension2 = 10;
net = selforgmap([dimension1 dimension2]);
% Train the Network
[net,tr] = train(net,P);
% Test the Network
outputs = net(P);
% View the Network
view(net)
%test
A=sim(net,[1 0]);
%plot Som map
axis([0 10 0 10]);
%hold on; plotting A in the Map
circles = plot(A,'ob');

댓글 수: 3

mouh nyquist
mouh nyquist 2015년 1월 15일
plz
Geoff Hayes
Geoff Hayes 2015년 1월 16일
Mouh - I think that you need to provide more details. What do you mean when you say that you can't do it with matlab? Are you observing errors (and if so, what are they) or are you just not getting the results that you desire?
mouh nyquist
mouh nyquist 2015년 1월 16일
thank you for your interesting to my question; I cant't do it with matlab ; I can't see the results of SOM in matlab; I can only training the SOM and I can't test the SOM ; I thing the SOM of matlab is not complet

댓글을 달려면 로그인하십시오.

 채택된 답변

Greg Heath
Greg Heath 2015년 1월 18일

1 개 추천

>> szout = size(outputs) % [ 100 8 ]
uniqueout = unique(outputs) % [ 0 1 ]
szout =
100 8
uniqueout =
0
1
>> findones = find(outputs == 1)
findones =
7
103
221
341
405
523
611
701
These can be converted to the positions of the training data in the 10 x 10 matrix.
similarly,
>> size(net([ 1 0]))
ans =
100 2
You can calculate the position .
However, I cannot make any sense of most of the plotsom routines.
Sorry,
Greg

댓글 수: 5

mouh nyquist
mouh nyquist 2015년 1월 18일
thank you a lot .that help me a lot; please if you can tell me how I can test this self-organizing map for exemple with this data [-2 2]
mouh nyquist
mouh nyquist 2015년 1월 18일
the self-organizing map of matlab; we can only training? not testing the map
Greg Heath
Greg Heath 2015년 1월 18일
y = net([-2 2]) will give you a 1x2 answer just like above for [ 1 0 ].
mouh nyquist
mouh nyquist 2015년 1월 19일
편집: mouh nyquist 2015년 1월 19일
thank you a lot , but when I use this; they give me two circles in the map (must have one circle in the map)
y = net([-2 2]);
%plot Som map
axis([0 10 0 10]);
%hold on; plotting A in the Map
circles = plot(y(:,1),y(:,2),'ob');
thank you a lot , but when I use this; they give me two circles in the map (must have one circle in the map)
y = net([-2 2]);
%plot Som map
axis([0 10 0 10]);
%hold on; plotting A in the Map
circles = plot(y(:,1),y(:,2),'ob');

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

질문:

2015년 1월 3일

댓글:

2015년 1월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by