Understanding Confusion Matrix by CHIRAG
What Is a Confusion Matrix? A confusion matrix is a performance evaluation tool in machine learning, representing the accuracy of a classification model. It displays the number of true positives, true negatives, false positives, and false negatives. A Confusion matrix is an N x N matrix used for evaluating the performance of a classification model, where N is the total number of target classes. For a binary classification problem, we would have a 2 x 2 matrix, as shown below, with 4 values: Let’s understanding this matrix: The target variable has two values: 0 & 1 The columns represent the Predicted values of the target variable The rows represent the Actual values of the target variable. But wait – what’s TP, FP, FN, and TN here? That’s the crucial part of a confusion matrix. Let’s understand each term below. Important Terms in a Confusion Matrix True Positive (TP) The predicted value matches the actual value...