What is the accuracy score in machine learning?
In the case of classification problems, accuracy is a metric using which the performance of the machine learning model can be measured. In this article, we will discuss what accuracy in machine learning is and how we can calculate accuracy scores using Python. But, before we understand that, we need to understand a few terms. They are True Positive (TP), True Negative (TN), False Positive (FP), and False Negative (FN).
True Positives (TP): True positives are those output labels that are predicted to be True and they are actually True.
True Negatives (TN): True negatives are the output labels that are predicted to be False and they are actually False also.
False Positives (FP): False positives are the output labels that are predicted to be True but are actually False.
False Negatives (FN): False negatives are those output labels that are predicted to be False but are actually True.
Let’s say the expected or actual output for a classification problem is:
Ya = [False, False, True, True, True, False, True, False, False, True]
And the calculated or predicted output is:
Y = [True, False, True, True, False, False, True, False, False, True]
So, the total number of:
True Negative = the output labels that are predicted to be False and they are actually False also = 4
False Positive = the output labels that are predicted to be True but they are actually False = 1
False Negative = output labels that are predicted to be False but they are actually True = 1
True Positive = output labels that are predicted to be True and they are actually True = 4
The accuracy score in machine learning is defined as: …






0 Comments