亲测,运行环境win10 64位系统,matlab R2014b libsvm-3.21 visual studio 2013
下载:http://download.csdn.net/download/u012260117/9810317
libsvm
测试数据集
1,下载libsvm
2,解压到C:\Program Files\MATLAB\R2014b\toolbox
3,设置路径
Add Folder和Add with Subfolders都设置。
4,打开make.m
输入make
5、拷贝4步骤中C:\Program Files\MATLAB\R2014b\toolbox\libsvm-3.22\libsvm-3.22\matlab文件夹下所有make出来的文件,到libsvm-3.21\windows文件夹下,全部替换。
测试:
测试数据集下载:
>> load heart_scale.mat
>> model = svmtrain(heart_scale_label, heart_scale_inst, ‘-c 1 -g 0.07‘);
>> [predict_label, accuracy, dec_values] = svmpredict(heart_scale_label, heart_scale_inst, model);
输出:
*
optimization finished, #iter = 134
nu = 0.433785
obj = -101.855060, rho = 0.426412
nSV = 130, nBSV = 107
Total nSV = 130
Accuracy = 86.6667% (234/270) (classification)
得到了分类精度,这就证明libsvm安装成功!