two_spiral_test_problem.m
来自「1.感知器对于线型可分问题的收敛性证明 2.用感知器对线型可分得问题进行分类 」· M 代码 · 共 29 行
M
29 行
%---------------------------------figure 1------------------------------
nRow=96;
nColumn =3;
result = reshape(two_spiral_test, [nRow nColumn]);
Px=result(1:96,1:2);
Tx = result(1:96,3);
P=Px';
T=Tx';
plotpv(P,T);
net=newp([-1.5 1;-1.5 1],2);
%---------------------------------figure 2-------------------------------
figure;
watchon;
cla;
plotpv(P,T);
linehandle=plotpc(net.IW{1},net.b{1});
E=1;
net=init(net);
linehandle=plotpc(net.IW{1},net.b{1});
%调整网络参数,直到平房和误差为0
while(mae(E))
[net,Y,E]=adapt(net,P,T);
linehandle=plotpc(net.IW{1},net.b{1},linehandle);
drawnow;
end;
watchoff
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?