我写的svm回归程序怎么一直有这个错误呢?
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();
%--------------------------------------------------------
%训练支持向量机
%ker='rbf'
ker='linear'
C=100
e=0.01
loss='einsensitivty'
svm = svr(x_train,y_train,ker,C,loss,e);
页:
[1]