Differentiate Precision, Recall, Accuracy, and the F1 Score?

Precision is the ratio of correctly predicted positive observation and total predicted positive observation. It shows how precise our model is.

* Precision = TP/TP+FP


Recall is the ratio of the correct predicted positive observation and the total observation in the class.

* Recall = TP/TP+FN


F1-Score is the weighted average of recall and precision.

* F1-Score = 2*(Recall * Precision) / (Recall + Precision)


Accuracy is the ratio of correctly predicted positive observations to the total positive observations.

* Accuracy = TP+TN/TP+TN+FP+FN