perceptron with confusion matrix