tf.contrib.metrics.confusion_matrix(predictions, labels, num_classes=None, dtype=tf.int32, name=None, weights=None)
Computes the confusion matrix from predictions and labels.
Calculate the Confusion Matrix for a pair of prediction and label 1-D int arrays.
Considering a prediction array such as: [1, 2, 3] And a label array such as: [2, 2, 3]
The confusion matrix returned would be the following one:
[[0, 0, 0]
[0, 1, 0]
[0, 1, 0]
[0, 0, 1]]
If weights is not None, then the confusion matrix