⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 percept1.m

📁 多个感知器神经元的分类问题 %四类输入向量
💻 M
字号:
%多个感知器神经元的分类问题
%四类输入向量
P=[0.1 0.7 0.8 0.8 1.0 0.3 0.0 -0.3 -0.5 -1.5;
   1.2 1.8 1.6 0.6 0.8 0.5 0.2 0.8 -1.5 -1.3];
T=[1 1 1 0 0 1 1 1 0 0;
   0 0 0 0 0 1 1 1 1 1];
net=newp([-2.5 2;-2.5 2],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});
while(sse(E))
    [net,Y,E]=adapt(net,P,T);
    linehandle=plotpc(net.IW{1},net.b{1},linehandle);
     drawnow;
end;
watchoff;
 figure;
 %验感器神经网络
 p=[0.9;1.1];
 a=sim(net,p);
 Thepoint=findobj(gca,'type','line');
 set(Thepoint,'color','red');
 hold on;
 plotpv(P,T);
 plotpc(net.IW{1},net.b{1});
 hold off;
 disp('End of percept1');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -