|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
Support Vector Regressing ....
______________________________
Constructing ...
Error: Unknown Loss Function\n
??? Undefined function or variable 'Hb'.
Error in ==> D:\Matlab6.5\toolbox\svm\svr.m
On line 78 ==> Hb = Hb+1e-10*eye(size(Hb));
Error in ==> D:\Matlab6.5\work\MySVM\SVM_Regression.m
On line 20 ==> svm = svr(x_train,y_train,ker,C,loss,e);
我用的是svm工具箱,下面是我的源代码:
clc
clear
close all
x_train=0:pi/10:2*pi %训练样本
y_train=sin(x_train) %训练目标
x_test=0:pi/5:4*pi %测试样本
y_test=sin(x_test) %测试目标
%plot(x_train,y_train,'b')
axis([0 4*pi -1 1]);
%--------------------------------------------------------
%训练支持向量机
%ker='rbf'
ker='linear'
C=100
e=0.01
loss='einsensitivty'
svm = svr(x_train,y_train,ker,C,loss,e); |
|