这一篇,主要是记载自己在使用libsvm中的问题:
【1】nu-svm与C-svm的区别:
[1]中解释如下:
同时[2]中解释为:
Basically they are the same thing but with different parameters. The range of C is from zero to infinity but nu is always between [0,1]. A nice property of nu is that it is related to the ratio of support vectors and the ratio of the training error.
[3]中对参数的解释比较明白。
[4]给出了一个交叉验证例子:
bestcv = 0;
for log2c = -5 : 5,
for log2g = -5 : 5,
cmd = ['-v 5 -c ', num2str(2^log2c), ' -g ', num2str(2^log2g)];
cv = svmtrain(train_label, train_data, cmd);
if (cv >= bestcv),
bestcv = cv;
bestc = 2^log2c;
bestg = 2^log2g;
end
fprintf('%g %g %g (best c=%g, g=%g, rate=%g)\n', log2c, log2g, cv, bestc, bestg, bestcv);
end
end
[5]给出了Libsvm与Liblinear相关的介绍。
参考:
【1】 http://140.112.30.28/~cjlin/papers/libsvm.pdf
【2】LIBSVM FAQ http://www.csie.ntu.edu.tw/~cjlin/libsvm/faq.html#f411
【3】LibSVM在MATLAB中应用及一些问题 http://heimingx.cn/2016/06/28/use-LibSVM-in-MATLAB/
【4】Libsvm中svmtrain操作的输入参数问题 https://www.zhihu.com/question/23659348
【5】LIBSVM与LIBLINEAR http://www.cnblogs.com/zhizhan/p/5001411.html
【6】Libsvm和Liblinear的使用经验谈 http://www.cnblogs.com/zhizhan/p/5001689.html