[繪圖] SVR支援向量回歸圖已回收
要跑支援向量回歸圖的程式碼為:
type='function estimation';
L_fold=3;
[gam,sig2]=tunelssvm({X,Y,type,1,1,'RBF_kernel'},[0.01 0.01;30000
30000],'gridsearch',{},'crossvalidate',{X,Y,L_fold});%[1 0.01;10000 10] set
the min(gam)=1,max(gam)=10000, min(sig2=0.01), and max(sig2)=10
[alpha,b]=trainlssvm({X,Y,type,gam,sig2,'RBF_kernel'});
newY=simlssvm({X,Y,type,gam,sig2,'RBF_kernel'},{alpha,b},Xt);
plot(newY)
hold on
plot(Yt,'r')
MSPR=norm(newY-Yt)/length(Yt)
New70Y=simlssvm({X,Y,type,gam,sig2,'RBF_kernel'},{alpha,b},X);
MSE(Y-new70Y)
但跑出來的結果為:
[gam,sig2]=tunelssvm({X,Y,type,1,1,'RBF_kernel'},[0.01 0.01;30000
30000],'gridsearch',{},'crossvalidate',{X,Y,L_fold});%[1 0.01;10000 10] set
the min(gam)=1,max(gam)=10000, min(sig2=0.01), and max(si
??? Undefined function or variable 'X'.
請問哪邊需要做修改呢,謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.136.137.42