Building Your Own Prediction Models
Chapter 1
[ 8 ]
Ideally, a confusion
matrix should have all zeros, except for the diagonal. Here we can
calculate the accuracy by
adding the figures diagonally, so that these are all the correctly
classified
examples, and dividing that sum by the sum of all the numbers in the matrix:
Here we got the accuracy as 84%. To know more about confusion matrices, let's go through
another example,
which involves three classes, as seen in the following diagram:
5QWTEGUEKMKVNGCTPFQEU
There are three different species of iris flowers. The matrix gives raw accounts of correct
and incorrect predictions. So,
Do'stlaringiz bilan baham: