分类分数:SVM [英] Classification score: SVM

查看:46
本文介绍了分类分数:SVM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 libsvm 进行多类分类.我如何附加分类分数,以比较分类的置信度,与给定样本的输出为:

I am using libsvm for multi-class classification. How can I attach classification scores, to compare the confidence of classification, with the output for a given sample as:

Class 1: score1

Class 2: score2

Class 3: score3

Class 4: score4

推荐答案

您可以首先使用一种与全部方法,并通过在 libSVM 中设置决策值选项将它们视为 2class 分类.这是通过将每个类作为正类,将类的其余部分作为每个分类的负类来实现的.

You can use one vs all approach first and consider them as 2class classification by having the decision value option in the libSVM. This is done by having the each class as positive class and rest of the class as negative for each classification.

然后比较结果的决策值对样本进行分类.就像您可以将样本分配给具有最高决策值的类一样.例如,样本1的决策值为1类0.54,2类0.64,3类0.43,4类0.80,则可以将其归类到4类.

Then compare the decision values of the results to classify the samples. Like you can assign the sample to the class which has the highest decision values. For example, sample 1 has decision value 0.54 for class 1, 0.64 for class 2, 0.43 for class 3 and 0.80 for class4, then you can classify it to class4.

您还可以通过在 libSVM 中使用 -b 选项来使用概率值而不是决策函数值进行分类.

You can also use probability values to classify instead of decision function values by using -b option in libSVM.

希望这有帮助..

这篇关于分类分数:SVM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆