且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

混淆矩阵的构造

更新时间:2023-12-03 23:06:04

我了解混淆矩阵的构造,以及如果更改了类,则条目的作用.

I have understood the construction of confusion matrices and the role of the entries if the class is changed.

使用以下方法获得的0类的混淆矩阵

The confusion matrices for the class 0 obtained using

caret::confusionMatrix(table(max.col(probabilities) - 1,Test_Set$Species), positive = '0')

以及使用

caret::confusionMatrix(table(max.col(probabilities) - 1,Test_Set$Species), positive = '1')

对于第0类,tp = 36,tn = 13,fp = 1,fn = 0,对于第1类:tp = 13,tn = 36,fp = 0,fn = 1(角色tp和tn的值,以及fp和fn的值被切换).

In case of class 0: tp = 36, tn = 13, fp = 1, fn = 0, and in case of class 1: tp = 13, tn = 36, fp = 0, fn = 1 (the roles of tp and tn, and that of fp and fn are switched).