I believe it is a common topic. However, I am sharing how I understood these concepts because it took me a while to grasp these concepts.
First, I will start with a confusion matrix which is also known as an Error matrix. This is a fundamental concept to understand in the field of machine learning.
From the image above,
n is the input data points. Here we have 2 classes which are :