10折交叉验证的混淆矩阵 [英] Confusion matrix of 10 fold cross validation

查看:224
本文介绍了10折交叉验证的混淆矩阵的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试执行 10 折交叉验证,以在 matlab 中使用神经网络分析我的字符识别项目的结果.我知道如何计算每个折叠的混淆矩阵.但问题是我不知道如何计算平均 10 倍的混淆矩阵.

I am trying to perform 10 fold cross validation for analysing the results of my character recognition project using neural networks in matlab. I know how to calculate the confusion matrix for each fold. But the problem is i dont know how to calculate the confusion matrix averaged over the 10 folds.

推荐答案

如果你有每个折叠的混淆矩阵,你可以简单地将它们的值相加得到总混淆矩阵.

If you have the confusion matrices for each fold, you can simply sum their values to get the total confusion matrix.

例如,如果你有两个折叠,结果混淆矩阵是

For example, if you had two folds,and the resulting confusion matrices were

                     Classifier
                 -----------------
                 Class 1   Class 2
Actual | Class 1      25         3
       | Class 2       6        21

                     Classifier
                 -----------------
                 Class 1   Class 2
Actual | Class 1      23         5
       | Class 2       4        23

那么总混淆矩阵为

                     Classifier
                 -----------------
                 Class 1   Class 2
Actual | Class 1      48         8
       | Class 2      10        44

这篇关于10折交叉验证的混淆矩阵的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆