ML Concepts – What is Confusion Matrix?

Confusion matrix is a performance measurement technique for machine learning which use to evaluate the performance of a classification model. It is a table that..

Confusion matrix is a performance measurement technique for machine learning which use to evaluate the performance of a classification model. It is a table that lists how many predictions a classifier made correctly and incorrectly. It is employed to evaluate a classification model’s effectiveness. It can be used to calculate performance metrics like accuracy, precision, recall, and F1-score in order to assess the effectiveness of a classification model.

Confusion Matrix has two values:

  1. Predicted Value
  2. Actual Value

Actual means it is true and reality. Predicted means what is the assumption for result.

We do the prediction, and result show the actual. It can be false or true as per prediction. There may be difference in what we are visualizing, and what we were realizing.

Let’s suppose one person went to doctor, check if disease Yes or No.

Doctor said: You do not have disease

Predicted: He didn’t had disease.

Means: True Negative

If doctor said that you do not have disease, but he had disease.

Means: False Negative

There are four types of components as True Positive, False Positive, True Negative, and False Negative.

  1. True Positive (TP): the number of malicious packets that have been correctly classified. A true positive is an outcome where the model correctly predicts the positive class.
  2. True Negative (TN): the number of packets that have been correctly classified. A true negative is an outcome where the model correctly predicts the negative class.
  3. False Positive (FP): False positive is where you receive a positive result for a test, when you should have received a negative result. (Type 1 Error or FPR)
  4. False Negative (FN): A related concept is a false negative, where you receive a negative result when you should have received a positive one. (Type 2 Error or FNR)

About The Author

Leave a Reply

Your email address will not be published. Required fields are marked *

About the Author

Dr Pranay Jha

Dr. Pranay Jha is a Cloud and AI Consultant with 18+ years of experience in hybrid cloud, virtualization, and enterprise infrastructure transformation. He specializes in VMware technologies, multi-cloud strategy, and Generative AI solutions. He holds a PhD in Computer Applications with research focused on Cloud and AI, has published multiple research papers, and has been a VMware vExpert since 2016 and a VMUG Community Leader.

BlockSpare — News, Magazine and Blog Addons for (Gutenberg) Block Editor