MATLAB——径向基网络拟合曲线和分类

1、广义RBF


P=1:.5:10; rand('state',pi); %指定状态,产生相同的随机数 T=sin(2*P)+rand(1,length(P)); % 给正弦函数加噪声 plot(P,T,'o') % net=newrb(P,T); %广义RBF net=newrb(P,T,0,5); test=1:.2:10; out=sim(net,test); % 对新的输入值test计算相对应的函数值 figure(1);%创建一个名为1的新窗口 hold on;plot(test,out,'b-'); legend('输入的数据','拟合的函数');

 2、(正则化RBF)

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

 3、概率神经网络处理分类

原文地址:https://www.cnblogs.com/long5683/p/10565080.html