Confusion matrix of 10 fold cross validation

空扰寡人 提交于 2021-01-22 05:01:07

问题


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.


回答1:


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

Then the total confusion matrix is

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


来源:https://stackoverflow.com/questions/22404668/confusion-matrix-of-10-fold-cross-validation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!