作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 weka java API,我可以在训练集上训练后得到预测的类标签。
double pred = fc.classifyInstance(test.instance(i));
但是我想知道类标签的置信概率,我应该使用什么函数?在 GUI 中我可以选择输出预测到一个 txt 文件并且可以很容易地得到概率,但我想知道如何通过代码。我正在使用 J48() 分类器。
最佳答案
weka.classifiers.Classifier.distributionForInstance(实例)
Predicts the class memberships for a given instance. If an instance is unclassified, the returned array elements must be all zero. If the class is numeric, the array must consist of only one element, which contains the predicted value. Note that a classifier MUST implement either this or classifyInstance().
(来源:JavaDoc)。
关于java - 如何从 weka API 计算置信度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21902473/
我是一名优秀的程序员,十分优秀!