libSVM 不同的结果 with/without 概率
libSVM different result with/without probabilities
我想知道如果我使用或不使用概率进行预测,为什么 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.
看了十几遍还是没看懂。有人能解释清楚吗?
我认为这是因为概率是使用交叉验证计算的(at least in python 但由于它在场景之外使用 libSvm,它可能会回答您的问题)。
此外,在文档中,他们指出这种交叉验证操作可能会产生与分数不一致的概率估计。
Needless to say, the cross-validation involved in Platt scaling is an expensive operation for large datasets. In addition, the probability estimates may be inconsistent with the scores, in the sense that the “argmax” of the scores may not be the argmax of the probabilities
A "normal" SVM 模型计算每个给定数据点的决策值,这基本上是所述点与分离超平面的距离。超平面一侧 (dec_value >= 0) 的所有内容都被预测为 class A,另一侧 (dec_value < 0) 的所有内容都被预测为 class B。
如果你现在计算class概率,可能有一个点的决策值为(例如)0.1,这将使它成为class A。但是[=的概率计算25=] A 可能是 45%,对于 class B 可能是 55%,所以算法现在会将其预测为 B.
计算上述 class 概率的可能算法在 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 会给出不同的准确度结果,我在 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.
看了十几遍还是没看懂。有人能解释清楚吗?
我认为这是因为概率是使用交叉验证计算的(at least in python 但由于它在场景之外使用 libSvm,它可能会回答您的问题)。
此外,在文档中,他们指出这种交叉验证操作可能会产生与分数不一致的概率估计。
Needless to say, the cross-validation involved in Platt scaling is an expensive operation for large datasets. In addition, the probability estimates may be inconsistent with the scores, in the sense that the “argmax” of the scores may not be the argmax of the probabilities
A "normal" SVM 模型计算每个给定数据点的决策值,这基本上是所述点与分离超平面的距离。超平面一侧 (dec_value >= 0) 的所有内容都被预测为 class A,另一侧 (dec_value < 0) 的所有内容都被预测为 class B。
如果你现在计算class概率,可能有一个点的决策值为(例如)0.1,这将使它成为class A。但是[=的概率计算25=] A 可能是 45%,对于 class B 可能是 55%,所以算法现在会将其预测为 B.
计算上述 class 概率的可能算法在 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,反之亦然。