【问题标题】:Weka displaying weird results for classification - question marks"?"Weka 显示奇怪的分类结果 - 问号“?”
【发布时间】:2019-09-16 18:41:38
【问题描述】:

我正在尝试在 Weka 中使用 ZeroR 算法,以便为我的分类问题提供基准性能。然而,Weka 显示的精度和 F 测量结果很奇怪,它显示了一个问号“?”而不是任何数字。有谁知道我该如何解决这个问题?

=== Classifier model (full training set) ===

ZeroR predicts class value: label 1

Time taken to build model: 0 seconds

=== Stratified cross-validation ===
=== Summary ===

Correctly Classified Instances         431               53.607  %
Incorrectly Classified Instances       373               46.393  %
Kappa statistic                          0     
Mean absolute error                      0.4974
Root mean squared error                  0.4987
Relative absolute error                100      %
Root relative squared error            100      %
Total Number of Instances              804     

=== Detailed Accuracy By Class ===

                 TP Rate  FP Rate  Precision  Recall   F-Measure  MCC      ROC Area  PRC Area  Class
                 0.000    0.000    ?          0.000    ?          ?        0.488     0.457     label 0
                 1.000    1.000    0.536      1.000    0.698      ?        0.488     0.530     label 1
Weighted Avg.    0.536    0.536    ?          0.536    ?          ?        0.488     0.496     

=== Confusion Matrix ===

   a   b   <-- classified as
   0 373 |   a = label 0
   0 431 |   b = label 1

【问题讨论】:

    标签: weka baseline


    【解决方案1】:

    没有错。请注意,您没有将案例归类为“a”,因此“a”的精度(等)无法确定。显然 Weka 会传播无法计算的值(就像 Excel 一样),因此也不计算整体精度。

    您真正的问题是您有一个模型将所有内容都归类为“b”,这不太可能有用。但那是 ZeroR,所以这只是你的起点。

    【讨论】:

    • 感谢@zbicyclist 的反馈。是的,我理解“a”的精度无法确定这一事实,Weka 将其传播到整体精度,但如果我们出于某种原因(报告结果)想要依赖 ZeroR 输出,我们可以将整体精度视为'b' ??
    • 是的。精度是这样定义的:在我们预测为 X 的那些案例中,有多少个 X?或者,真阳性/(真阳性+假阳性)。所以,在这种情况下,就是 431 / (431 + 373) = .536。
    猜你喜欢
    • 2013-05-18
    • 2016-10-04
    • 2021-08-03
    • 2011-11-01
    • 2015-01-13
    • 2018-05-28
    • 2016-11-19
    • 2015-10-04
    • 2012-03-24
    相关资源
    最近更新 更多