包已经解压到文件?/p>
F:\R2009b\toolbox\svm
matlab
?/p>
SVM
工具箱的使用方法
1,
下载
SVM
工具?/p>
:
http://see.xidian.edu.cn/faculty/chzheng/bishe/indexfiles/indexl.htm
2,
安装?/p>
matlab
文件夹中
1)
将下载的
SVM
工具箱的文件夹放?/p>
\matlab71\toolbox\
?/p>
2)
打开
matlab->File->Set Path
中添?/p>
SVM
工具箱的文件?/p>
现在
,
就成功的添加成功?/p>
.
可以测试一?/p>
:
?/p>
matlab
中输?/p>
which svcoutput
回车
,
如果可以正确显示路径
,
就证明添?/p>
成功?/p>
,
例如
:
C:\Program Files\MATLAB71\toolbox\svm\svcoutput.m
3,
?/p>
SVM
做分类的使用方法
1)
?/p>
matlab
中输入必要的参数
:X,Y,ker,C,p1,p2
我做的测试中取的数据?/p>
:
N = 50;
n=2*N;
randn('state',6);
x1 = randn(2,N)
y1 = ones(1,N);
x2 = 5+randn(2,N);
y2 = -ones(1,N);
figure;
plot(x1(1,:),x1(2,:),'bx',x2(1,:),x2(2,:),'k.');
axis([-3 8 -3 8]);
title('C-SVC')
hold on;
X1 = [x1,x2];
Y1 = [y1,y2];
X=X1';
Y=Y1';
其中
,X
?/p>
100*2
的矩?/p>
,Y
?/p>
100*1
的矩?/p>
C=Inf;