小编ama*_*dia的帖子

从 R 中的混淆矩阵的结果计算精度、召回率和 FScore

我有以下混淆矩阵,现在我需要从中计算精度、召回率和 FScore,我如何使用获得的值来做到这一点?混淆矩阵和统计

      Reference
Prediction One Zero
      One   37   43
      Zero  19  131

               Accuracy : 0.7304          
                 95% CI : (0.6682, 0.7866)
    No Information Rate : 0.7565          
    P-Value [Acc > NIR] : 0.841087        

                  Kappa : 0.3611          
 Mcnemar's Test P-Value : 0.003489        

            Sensitivity : 0.6607          
            Specificity : 0.7529          
         Pos Pred Value : 0.4625          
         Neg Pred Value : 0.8733          
             Prevalence : 0.2435          
         Detection Rate : 0.1609          
   Detection Prevalence : 0.3478          
      Balanced Accuracy : 0.7068          

       'Positive' Class : One
Run Code Online (Sandbox Code Playgroud)

根据其他用户的建议,我使用了以下编辑过的代码

library(class)
library(e1071)
library(caret)
library(party)
library(nnet) …
Run Code Online (Sandbox Code Playgroud)

r confusion-matrix precision-recall

5
推荐指数
2
解决办法
9223
查看次数

标签 统计

confusion-matrix ×1

precision-recall ×1

r ×1