?? 2-14.m
字號(hào):
P = [0.1 0.8 0.1 0.9; 0.2 0.9 0.1 0.8];
net = newsom([0 2; 0 1],[3 5]);
plotsom(net.layers{1}.positions);
%進(jìn)行訓(xùn)練
%訓(xùn)練次數(shù)為10
net.trainParam.epochs = 10;
net = train(net,P);
plot(P(1,:),P(2,:),'.g','markersize',20);
hold on;
%繪制訓(xùn)練后神經(jīng)元的位置
plotsom(net.iw{1,1},net.layers{1}.distances);
hold off;
figure;
%訓(xùn)練次數(shù)為25
%訓(xùn)練前進(jìn)行初始化
net=init(net);
net.trainParam.epochs = 20;
net = train(net,P);
plot(P(1,:),P(2,:),'.g','markersize',20);
hold on;
plotsom(net.iw{1,1},net.layers{1}.distances);
hold off;
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -