您的位置:首页 > 理论基础 > 计算机网络

径向基神经网络相关函数:newrbe

2017-04-03 18:14 246 查看
>> help newrbe
newrbe - Design exact radial basis network
(创建一个严格的径向基神经网络)


    This MATLAB function
takes two or three arguments, P RxQ matrix of Q R-element

    input vectors T SxQ
matrix of Q S-element target class vectors spread Spread
of

    radial basis
functions (default = 1.0)


    net =
newrbe(P,T,spread)

P是R*Q 的输入矩阵,
T是S*Q 期望输出矩阵
spread 是标量,表示径向基函数的扩散速度,缺省值为1

举例(一):

tic
P=-2:.2:2;
rand('state',pi);
T=P.^2+rand(1,length(P)); % 在二次函数中加入噪声
net=newrbe(P,T,3); % 建立严格的径向基函数网络
test=-2:.1:2;
out=sim(net,test); % 仿真测试
toc
figure(1);
plot(P,T,'o');
hold on;
plot(test,out,'b-');
legend('输入的数据','拟合的函数');




注:tic  toc  可用来计时

(二)

%%
n = -5:0.1:5;
a = radbas(n-2); % 中心位置向右平移两个单位
b = exp(-(n).^2/2);     %
除以2,曲线更加“矮胖”
figure;
plot(n,a);
hold on;
plot(n,b,'--'); % 虚线
legend('平移后','平移前');

c = diff(a); % 计算a的微分
hold off;
figure;
plot(c);
title('a的微分');
figure;
d=diff(n);
plot(d);
title('n的微分');



内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: