Add confusion matrix.

The confusion matrix will help in building a cost function better than the one actually used.