Calculates the accuracy of a classification model, representing the proportion of correct predictions.