1
我已經使用R生成了一個混淆矩陣,如下所示。是否有可能從R中的混淆矩陣中檢索出假陽性和假陰性?
是否可以從該矩陣中檢索61的假負值並將其分配給R中的變量? $ byClass似乎不適用於這種情況。 謝謝。
Confusion Matrix and Statistics
Reference
Prediction no yes
no 9889 61
yes 6 44
Accuracy : 0.9933
95% CI : (0.9915, 0.9948)
No Information Rate : 0.9895
P-Value [Acc > NIR] : 4.444e-05
Kappa : 0.5648
Mcnemar's Test P-Value : 4.191e-11
Sensitivity : 0.9994
Specificity : 0.4190
Pos Pred Value : 0.9939
Neg Pred Value : 0.8800
Prevalence : 0.9895
Detection Rate : 0.9889
Detection Prevalence : 0.9950
Balanced Accuracy : 0.7092
'Positive' Class : no
請給出一個可重複的例子:http://stackoverflow.com/q/5963269/4996248 –
也許'as.matrix()'可以讓你得到混淆矩陣中的單個值。 –