本文介绍了在libsvm(Python)中优先使用一类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始在python中使用libsvm进行游戏,并获得了一些简单的分类方法.

I just started playing a bit with libsvm in python and got some simple classification to work.

问题是我正在构建人脸检测系统,并且我想要一个非常低的错误拒绝率.另一方面,svm似乎针对相等的错误拒绝和错误接受进行了优化.我在这里有什么选择?

The problem is that I'm constructing a face detection system, and I want a very low false rejection rate. The svm on the other hand seems to optimize for equal false rejection and false acceptance. What options do I have here?

就像前面所说的,我对libsvm还是很陌生,所以请客气. ;)

And as a said earlier, I'm very new to libsvm, so be kind. ;)

推荐答案

SVM通常不被认为是概率模型,而是最大判别模型.因此,我很难根据我对SVM的了解来提出您的问题.

SVMs are not usually thought of as a probabilistic model, but a maximally-discriminant model. Thus I have a hard time formulating your question in the context of what I know of SVMs.

此外,libSVM附带的Python绑定性能不佳,并且没有公开libSVM的所有选项.

In addition, the Python bindings that come with libSVM are not terribly performant and don't expose all the options of libSVM.

也就是说,如果您愿意查看其他绑定,则 scikit-learn svm绑定更加丰富,并公开了一些可能派上用场的参数,例如加权类加权样本.您也许可以将重点放在不想误分类的类上.

That said, if you are willing to look at other bindings, the scikit-learn's svm bindings are richer and expose some parameters that may come in handy, such as weighted classes, or weighted samples. You might be able to put more emphasis on the class for which you do not want mis-classification.

此外,scikit的绑定公开了后验分类概率,但是就SVM而言,我相信它依赖于libSVM的破解(因为SVM不具有概率性),它会对类别进行重新采样以使预测具有置信区间.

In addition, the scikit's binding expose a posterior classification probability, but in the case of SVMs, I believe that it relies on a hack (as SVMs are not probabilistic) of libSVM that resamples the classification to have a confidence interval on the prediction.

这篇关于在libsvm(Python)中优先使用一类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 10:33