Matrix of confusion


In the field of artificial intelligence a confusion matrix is ​​a tool that allows the visualization of the performance of an algorithm that is used in supervised learning. Each column in the array represents the number of predictions for each class, while each row represents the instances in the actual class. One of the benefits of confusion matrices is that they make it easy to see if the system is confusing two classes.

If in the input data the number of samples of different classes changes greatly the classifier error rate is not representative of how well the classifier performs the task. If for example there are 990 samples of class 1 and only 10 of class 2, the classifier can easily have a bias towards class 1. If the classifier classifies all samples as class 1 their accuracy will be 99%. This does not mean that it is a good classifier because it had a 100% error in sorting class 2 samples.

In the example matrix below, of 8 real cats, the system predicted that three were dogs and six dogs predicted that one was a rabbit and two were cats. From the matrix you can see that the system has problems distinguishing between cats and dogs, but it can distinguish reasonably well between rabbits and other animals.

Confusion matrix example

http://www2.cs.uregina.ca/~dbd/cs831/notes/confusion_matrix/confusion_matrix.html



wiki

Popular Posts