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安装成功!