new function to compute individual recognition rate of each class and average recognition rate