Accuracy is defined as the percentage of correct predictions out of all the observations. A prediction is said to be correct if it matches reality. Here we have two conditions in which the Prediction matches with the Reality, i.e., True Positive and True Negative. Therefore, Formula for Accuracy is
Accuracy = Correct Predictions / Total Cases * 100%
Accuracy = (TP + TN) / (TP + TN + FP + FN +) * 100%
Where TP = True Positives, TN = True Negatives, FP = False Positives, and FN = False Negatives.
Study more about Modelling at Modelling Class 10