It's my understanding that when training an SVM on the command line you can specify a -b parameter with -b 0 (default) or -b 1 to enable 'decision values' or 'probability estimates' respectively. I'm using LIBSVM with a C-SVC based multi-class problem with 5 classes. I can obtain probability estimates in the C# library using
testset.PredictProbability(model, out estimations);
After the prediction, I can see the 5 probability estimates within the 'estimations' output object. It's my understanding that there should be 10 decision values for the 5 class model i.e. one for class 1 vs class 2, another for class 1 vs class 3 and so forth. How do I get the 'decision values'?
答案 0 :(得分:0)
通过libsvm API公开了三个预测函数。预测,预测概率并用值预测。目前无法同时获得概率估计值和决策值。
可以通过调用 PredictValues 函数返回决策值。它们确实将以类X和类Y的形式进行分类,因为多类SVM是通过一对一方法执行的。这导致训练k *(k-1)/ 2个分类器(每个分类对应一个)。这些是SVM使用的原始决策值。另一方面,概率是每个类的估计概率,因此当然只包含每个类的单个值。