libSVM 有/没有概率的不同结果

标签 libsvm

我想知道为什么 libSVM 在使用或不使用概率进行预测时会给出不同的准确度结果,并且我在 this page 找到了常见问题解答其中说

Q: Why using svm-predict -b 0 and -b 1 gives different accuracy values?

Let's just consider two-class classification here. After
probability information is obtained in training, we do not have
prob > = 0.5 if and only if decision value >= 0.
So predictions may be different with -b 0 and 1. 

我读了又读了十几遍,但还是不明白。有人可以解释得更清楚吗?

最佳答案

“正常”SVM 模型计算每个给定数据点的决策值,该值基本上是该点与分离超平面的距离。超平面一侧 (dec_value >= 0) 上的所有内容都被预测为 A 类,另一侧 (dec_value < 0) 上的所有内容都被预测为 B 类。

如果您现在计算类别概率,则可能有一个点的决策值为(例如)0.1,这将使其成为 A 类。但是 A 类的概率计算可能为 45%,B 类的概率计算为 55% ,因此算法现在将其预测为 B。

用于计算所述类概率的可能算法在their paper中描述。 ,第 8 节。

有问题的句子

After probability information is obtained in training, we do not have prob > = 0.5 if and only if decision value >= 0. So predictions may be different with -b 0 and 1.

基本上是说“决策值 >= 0 并不意味着 probA > probB,反之亦然。

关于libSVM 有/没有概率的不同结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29708301/

相关文章:

matlab - 如何提高SVM的性能?

svm - libsvm在预测结果作为概率估计时使用哪种方法

java - 在 libsvm 中编码分类变量

machine-learning - 如何在svm多标签中进行文件训练和测试?

machine-learning - LIBSVM 分类准确率 100% - 可能出了什么问题?

python - 支持向量机,scikit-学习 : Decision values with RBF kernel

python - 预测整数的简单 SVM 算法

machine-learning - libsvm 模型文件格式

python - Sklearn SVM系数属性-如何获取类名?

r - Predict.svm 不预测新数据