calculate precision, recall and f-score