xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

資源簡介

matlab回歸預測的源代碼,使用RBF和SVM兩種機器學習法,對這兩種方法進行了對比。

資源截圖

代碼片段和文件信息

clc;
clear;
close?all;

%產生學習數據generate?the?learing?data
ld=400;?%???????
x=rand(2ld);?%在0和1之間隨機產生2*400的行列式
x=(x-0.5)*1.5*2;?%-1.5?1.5?
x1=x(1:);%1*400的行向量
x2=x(2:);%1*400的行向量
F=20+x1.^2-10*cos(2*pi*x1)+x2.^2-10*cos(2*pi*x2);%行向量


%生成RBF神經網絡
net=newrb(xF0.001);%%%x是輸入,F是目標輸出

%?yb=sim(netx);
%?x1=reshape(x12020);
%?x2=reshape(x22020);
%?yb=reshape(yb2020);
%?F=reshape(F2020);
%?figure
%?subplot(131);
%?mesh(x1x2F);
%?subplot(132);
%?mesh(x1x2yb);


%%產生測試數據
interval=0.1;
[i?j]=meshgrid(-1.5:interval:1.5);
row=size(i);

tx1=i(:);
tx1=tx1‘;

tx2=j(:);
tx2=tx2‘;

tx=[tx1;tx2];%三維空間的平面測試坐標(xy),兩行

%testing
ty=sim(nettx);%把測試坐標輸入,進行逼近

v=reshape(tyrow);
figure
subplot(132)
mesh(ijv);
title(‘預測圖像‘)
zlim([060])

%plot?the?original?function
interval=0.1;
[x1?x2]=meshgrid(-1.5:interval:1.5);
F?=?20+x1.^2-10*cos(2*pi*x1)+x2.^2-10*cos(2*pi*x2);
subplot(131)
mesh(x1x2F);
title(‘實際數據‘)
zlim([060])

%plot?the?error
subplot(133)
mesh(x1x2F-v);
title(‘誤差‘)
zlim([060])


?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????1166??2013-11-29?20:48??rbf_approx.m
?????文件????????5655??2013-11-28?12:47??SVM_approx.m

評論

共有 條評論