Calculate precision, recall and accuracy using numpy.