Weka中的SMO信心度量 [英] SMO confidence measure in weka

查看:196
本文介绍了Weka中的SMO信心度量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用weka的 smo 类编写分类代码。但我还没有找到一个实例分类的置信度量。当调用 distributionForInstance 时,它总是返回0或1。我有两个课程要分类。知道我怎么能得到这个措施?谢谢。

I'm writing a classification code using the smo class of weka. But what i'm yet to find is a confidence measure of the classification of an instance. It always either returns 0 or 1 when distributionForInstance is called. I have two classes to be classified into. Any idea how i can get this measure? Thanks.

推荐答案

好的我想出了如何得到它以防万一它可以帮助某人。获取 SMO.java 的源代码并将其添加到您的包中。如果有的话,解决进口。将 m_fitLogisticModels 设置为 true 。将 smo.buildClassifier(train,cl1,cl2,false,-1,-1); 更改为 smo.buildClassifier(train,cl1,cl2, true,-1,-1); 。而中提琴! distributionForInstance 返回置信度分数而不是硬0/1。

Ok I figured out how to get this in case it might help someone. Get the source code for SMO.java and add it to your package. Resolve imports if any. Set m_fitLogisticModels to true. Change smo.buildClassifier(train, cl1, cl2, false, -1, -1); to smo.buildClassifier(train, cl1, cl2, true, -1, -1);. And viola ! distributionForInstance returns confidence scores instead of a hard 0/1.

这篇关于Weka中的SMO信心度量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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