menu search
brightness_auto
more_vert
1 1

What is a confusion matrix? Explain in detail with the help of an example.

Topic - Evaluation 

Type - Long answer 

thumb_up_off_alt 1 like thumb_down_off_alt 0 dislike

1 Answer

more_vert
 
verified
Verified Answer
1

A 2x2 matrix denoting the right and wrong predictions might help us analyze the rate of success. This matrix is termed the Confusion Matrix.

Evaluation of the performance of a classification model is based on the counts of test records correctly and incorrectly predicted by the model.

Therefore, Confusion Matrix provides a more insightful picture which is not only the performance of a predictive model, but also which classes are being predicted correctly and incorrectly, and what type of errors are being made.

The confusion matrix is useful for measuring Recall, Precision, Accuracy and F1 Score.

The following confusion matrix table illustrates how the 4-classification metrics are calculated, and how our predicted value compared to the actual value in a confusion matrix

Let's decipher the matrix:

The target variable has two values: Positive or Negative

The columns represent the actual values of the target variable

The rows represent the predicted values of the target variable

TP , TN, FP and FN in a Confusion Matrix

True Positive (TP)

The predicted value matches the actual value

The actual value was positive and the model predicted a positive value

True Negative (TN)

The predicted value matches the actual value

The actual value was negative and the model predicted a negative value

False Positive (FP) - Type 1 error

The predicted value was falsely predicted

The actual value was negative but the model predicted a positive value ● Also known as the

Type 1 error

False Negative (FN) - Type 2 error  

The predicted value was falsely predicted

The actual value was positive but the model predicted a negative value also known as the Type 2 error

Example: Case: Loan (Good loan & Bad loan)

The result of TP will be that bad loans are correctly predicted as bad loans.
 

The result of TN will be that good loans are correctly predicted as good loans.

The result of FP will be that (actual) good loans are incorrectly predicted as bad loans.

The result of FN will be that (actual) bad loans are incorrectly predicted as good loans. The banks would lose a bunch of money if the actual bad loans are predicted as good loans due to loans not being repaid.

On the other hand, banks won't be able to make more revenue if the actual good loans are predicted as bad loans. Therefore, the cost of False Negatives is much higher than the cost of False Positives.


Study more about Evaluation at Evaluation Class 10

thumb_up_off_alt 1 like thumb_down_off_alt 0 dislike

Related questions

thumb_up_off_alt 1 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 3 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 2 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 4 like thumb_down_off_alt 0 dislike
0 answers
thumb_up_off_alt 2 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 0 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 2 like thumb_down_off_alt 0 dislike
1 answer
Welcome to Aiforkids, where you can ask questions and receive answers from other members of the community.

AI 2024 Class 10 Board Exams mein 100% laane ka plan OPEN NOW

Class 10 Complete One Shot AI Lectures at - Youtube

1.5k questions

1.4k answers

4 comments

4.6k users

...