批处理感知器算法的代码matlab w1=[1,0.1,1.1;1,6.8,7.1;1,-3.5,-4.1;1,2.0,2.7;1,4.1,2.8;1,3.1,5.0;1,-0.8,-1.3; 1,0.9,1.2;1,5.0,6.4;1,3.9,4.0]; w2=[1,7.1,4.2;1,-1.4,-4.3;1,4.5,0.0;1,6.3,1.6;1,4.2,1.9;1,1.4,-3.2;1,2.4,-4.0; 1,2.5,-6.1;1,8.4,3.7;1,4.1,-2.2]; w3=[1,-3.0,-2.9;1,0.5,8.7;1,2.9,2.1;1,-0.1,5.2;1,-4.0,2.2;1,-1.3,3.7;1,-3.4,6.2; 1,-4.1,3.4;1,-5.1,1.6;1,1.9,5.1]; figure; plot(w3(:,2),w3(:,3),'ro'); hold on; plot(w2(:,2),w2(:,3),'b+'); W=[w2;-w3];%增广样本规范化 a=[0,0,0]; k=0;%记录步数 n=1; y=zeros(size(W,2),1);%记录错分的样本 while any(y<=0) k=k+1; y=a*transpose(W);%记录错分的样本 a=a+sum(W(find(y<=0),:));%更新a if k >= 250 break end end if k<250 disp(['a为:',num2str(a)]) disp(['k为:',num2str(k)]) else disp(['在250步以内没有收敛,终止']) end %判决面:x2=-a2*x1/a3-a1/a3 xmin=min(min(w1(:,2)),min(w2(:,2))); xmax=max(max(w1(:,2)),max(w2(:,2))); x=xmin-1:xmax+1;%(xmax-xmin): y=-a(2)*x/a(3)-a(1)/a(3); plot(x,y)
上传时间: 2016-11-07
上传用户:a1241314660
To show Gibbs phenomenon, using FFTs to sum Fourier Give the curve plot at the end of the simulation
标签: the phenomenon simulati Fourier
上传时间: 2014-01-07
上传用户:佳期如梦
In the end, I don t understand the PC, so I will fine the date to you. I only know flash.
标签: the understand flash date
上传时间: 2016-10-30
上传用户:lhc9102
Long-distance rmi transfers java to realize may realize a service end many client side conversation contact surface to be artistic
标签: realize Long-distance conversation transfers
上传时间: 2017-01-21
上传用户:cuiyashuo
Mastering Dojo will teach you how to build an Internet application that will impress your end users and delight you while you’re writing it. The book also explains Dojo’s JavaScript underpinnings, both for newcomers and for refugees from other languages.
标签: will application Mastering Internet
上传时间: 2017-07-02
上传用户:chenbhdt
Use of this source code is subject to the terms of the Microsoft end-user
标签: Microsoft the end-user subject
上传时间: 2013-12-18
上传用户:rishian
How to desC1rs yea !# 4as end e
上传时间: 2013-12-17
上传用户:yangbo69
how to search for the biggest end folder from your sistem (under Linux)
标签: biggest folder search sistem
上传时间: 2013-12-19
上传用户:TF2015
This code detects memory leaks in embedded VC++ almost the same way crtdbg does in VC++. At the end of program execution it will display in the debug window if there were any memory leaks and how the memory looks so you can identify where your memory leak occurred. It will display in the debug window a message saying no memory leaks detected if there are no memory leaks. Similar to what crtdbg.h does in VC++. The code detects memory leaks generated with calls to new and delete operators in C++. The code doesn t detect memory leaks generated with C functions: malloc, calloc, free, but that can be done in the future. Let me know and I will program it.
标签: the embedded detects almost
上传时间: 2015-05-07
上传用户:comua
This will sample all 8 A/D-channels by the continous mode. Each end of conversion will call an interrupt routine, where the AD-channel is put to Port4[2..0] and the upper nibble of the result is put to Port4[7..4]. Port 4 is connected to the user LEDs of the FlashCan100P Evaluation-Board
标签: will D-channels conversion continous
上传时间: 2013-12-09
上传用户:zm7516678