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

📄 bpm_dec_bnds.m

📁 Simon Haykin的 《Neural NetWorks》例子原码
💻 M
字号:
function A=bpm_dec_bnds(W1, b1, W2, b2, st_sz)% function A=bpm_dec_bnds(W1, b1, W2, b2, st_sz)%% Determines the decision boundaries using the weights calculated by% the bpm_train routine.% The region of interest is hard coded (x=-6:st_sz:6; y=-4:st_sz:4;).% st_sz is the resolution of the grid over which testing is performed.%% Hugh Pasika 1997x=-6:st_sz:6;	y=-4:st_sz:4;for i=1:length(x),  for j=1:length(y),    input  = [x(i) y(j)]';    outHiddenLayer = bpm_phi(W1*input+b1);    outOutputLayer = bpm_phi(W2*outHiddenLayer+b2);    output	  = outOutputLayer;    if output(1) > output(2)      A(j,i)=-1;    else      A(j,i)=1;    end  endendcontour(x,y,A,1);set(gca,'XLim',[-6 6]);gridtitle('Decision Boundary')

⌨️ 快捷键说明

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