Update function to calculate (precision, record and F-score