Confusion matrix neural network plot interpretation

3 views (last 30 days)
I would greatly appreciate if someone could help me interpret the confusion matrix below. I don't understand the red, green and grey boxes.Also, what is the difference between test, validation, training and all confusion matrix. Thanks in advance!

Accepted Answer

Greg Heath
Greg Heath on 27 Sep 2016
By default, the data is divided into three subsets (trn/val/tst):
total = training + validation + testing
You can think of it two different ways:
1. total = designing + testing
designing = training + validation
2. total = training + nontraining
nontraining = validation + testing
TRAINING SUBSET: Design data used to directly determine the weights and thresholds of the model given inputs and targets (desired outputs). It's performance estimates are, obviously, highly biased.
VALIDATION SUBSET: Nontraining design data used two ways:
1. Validation stopping: Training is stopped
when the error on the validation subset
increases for 6(default) consecutive epochs.
2. Ranking multiple designs with slightly
biased performance estimates that typically
differ by
a. number of hidden nodes
b. initial random weight assignments.
TESTING SUBSET: Once designs are ranked to be satisfactory, UNBIASED PERFORMANCE ESTIMATES are obtained using the test subset.
If no unbiased performance estimate is
satisfactory, the process can be repeated with
the data repartitioned and/or design parameters
changed.
MATLAB yields separate confusion matrices for the three data division subsets in addition to the one for all of the data .
Hope this helps.
Greg

More Answers (1)

Greg Heath
Greg Heath on 27 Sep 2016
This is a VERY POOR classification confusion matrix layout
1. There should be three confusion matrices
a. One 5x5 count confusion matrix
b. Two 5x5 percent confusion matrices
2. For the count confusion matrix
a. The rows should indicate how many of
each target class are classified into
each output class
b. The last column should contain the
total number of members of each
"T"arget class
c. The last row should contain the total
number of members "A"ssigned to each
class
1 2 3 4 | T
----------------------------
1| 6670 28 801 501 | 8000
2| 86 6476 762 676 | 8000
3| 1234 625 5934 207 | 8000
4| 558 804 127 6511 | 8000
----------------------------
A| 8548 7933 7624 7895 | 3200
3. For the row percent confusion matrix
each row is divided by the total in column
T and multiplied by 100. This indicates
what percent of each class is assigned to
each output.
4. For the column percent confusion matrix
each column is divided by the total in row
A and multiplied by 100. This indicates what
percent of each output is caused by which
target class.
5. THE MATLAB CONVENTION
a. The count confusion is TRANSPOSED from
the classical convention.
b. It is not obvious what the percentages
mean.
c. I figured it out some years ago. Then I
shook my head in bewilderment and tried to
forget it. It looks like I succeeded.
Hope this helps.
Good Luck.
Greg
  1 Comment
Swathi Ganesh
Swathi Ganesh on 27 Sep 2016
Thank You Greg. This plot is generated by the neural network app in matlab. I did not come across row and count confusion matrices in Matlab. I am attaching another image which has 4 confusion matrix plots.

Sign in to comment.

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!