Computes precision and recall