I was offered a confusion matrix, which is called Parametrised 5x5 confusion matrix by authors where I extracted the values and where the diagonal has the correct results (0 in all); the results are bad, which can be seen in the confusion matrix; they do not understand why; in ideal situation, all values should be zero that is no failures should occur; I would like to visualise the matrix somehow to explain how interpret such non-standard confusion matrix
Real Prediction
A B C D E
A 0 1 1 1 1
B 1 0 2 2 2
C 2 2 0 3 3
D 3 3 3 0 4
E 4 4 4 4 0
Claims
- it is critical to have cells wrong in column(2-5) - row(2-5) i.e. the lower right square matrix; the authors put equal critical grade on all these cells
- Column A and row A are ok.
Visualisation attempts
I am thinking if cells of column(2-5) - row(2-5) can visualised individually like in normal confusion matrix, since the deviation from the diagonal indicates the severity.
Unable to use fourfoldplot for the inspection in R 3.1.1
# http://stackoverflow.com/questions/23891140/r-how-to-visualize-confusion-matrix-using-the-caret-package ctable <- as.table(matrix(c(0, 1, 1, 1, 1, 1, 0, 2, 2, 2, 2, 2, 0, 3, 3, 3, 3, 3, 0, 4, 4, 4, 4, 4, 0), nrow = 5, byrow = TRUE)) fourfoldplot(ctable, color = c("#CC6666", "#99CC99"), conf.level = 0, margin = 1, main = "Confusion Matrix") > install.packages("fourfoldplot") Installing package into ‘/usr/local/lib/R/site-library’ (as ‘lib’ is unspecified) --- Please select a CRAN mirror for use in this session --- Warning message: package ‘fourfoldplot’ is not available (for R version 3.1.1)
Attempt in Mathematica
MatrixPlot[{ {0, 1, 1, 1, 1}, {1, 0, 2, 2, 2}, {2, 2, 0, 3, 3}, {3, 3, 3, 0, 4}, {4, 4, 4, 4, 0}}]
Fig. 1 proposes me that the critical points are column1-row5 and column1-(row1-4) whch are brightest colored (orange) while the original claim that the whole lower square matrix column(2-5)-row(2-5) are equally all wrong. To claim that column1-row5 is right does not make sense.
How can you classify/interpet such a confusion matrix?