SlideShare a Scribd company logo
CONFUSION MATRIX
MEANING
• A tool for evaluating the performance of a classification model for a
given set of test data
• Provides a detailed breakdown of how well a model is performing in
terms of classifying instances into different classes
• For 2 prediction classes of classifiers, the matrix is of 2*2 table
• For 3 classes, it is 3*3 table
• The matrix is divided into two dimensions, that are predicted values and
actual values.
• Predicted values are values, which are predicted by the model, and actual
values are true values for the given observations.
Matrix
• True Negative [TN]: Model has given prediction No, and the real or
actual value was also No.
• True Positive [TP]: The model has predicted yes, and the actual value
was also true.
• False Negative [FN]: The model has predicted no, but the actual value
was Yes, it is also called as Type-II error.
• False Positive [FP]: The model has predicted Yes, but the actual value
was No. It is also called a Type-I error.
Need for Confusion Matrix
• Evaluates the performance of the classification models, making
predictions on test data, and tells how good classification model is.
• Tells the error made by the classifiers but also the type of errors such
as either type-I or type-II error.
• Helpful to calculate the parameters for classification model, such as
accuracy, precision, etc.
Sensitivity and Specificity
• Sensitivity tells us what proportion of the positive class got correctly
classified.
• A simple example would be determining what proportion of the
actual sick people were correctly detected by the model.
• False Negative Rate (FNR) tells us what proportion of the positive
class got incorrectly classified by the classifier.
• A higher TPR and lower FNR are desirable since we want to classify
the positive class correctly.
• Specificity tells us what proportion of the negative class got correctly
classified.
Calculation using Confusion Matrix
• Classification Accuracy: Defines how often the model predicts the
correct output
• Misclassification rate: Also termed as Error rate, and it defines how
often the model gives the wrong predictions.
• Precision: It can be defined as the number of correct outputs
provided by the model or out of all positive classes that have
predicted correctly by the model.
• Recall: It is defined as the out of total positive classes, how our model
predicted correctly.
• F-measure: Score helps us to evaluate the recall and precision at the
same time.
Ad

More Related Content

What's hot (20)

Performance Metrics for Machine Learning Algorithms
Performance Metrics for Machine Learning AlgorithmsPerformance Metrics for Machine Learning Algorithms
Performance Metrics for Machine Learning Algorithms
Kush Kulshrestha
 
07 dimensionality reduction
07 dimensionality reduction07 dimensionality reduction
07 dimensionality reduction
Marco Quartulli
 
Cross-validation Tutorial: What, how and which?
Cross-validation Tutorial: What, how and which?Cross-validation Tutorial: What, how and which?
Cross-validation Tutorial: What, how and which?
Pradeep Redddy Raamana
 
Eigen-Decomposition: Eigenvalues and Eigenvectors.pdf
Eigen-Decomposition: Eigenvalues and Eigenvectors.pdfEigen-Decomposition: Eigenvalues and Eigenvectors.pdf
Eigen-Decomposition: Eigenvalues and Eigenvectors.pdf
NehaVerma933923
 
K-Means Clustering Algorithm.pptx
K-Means Clustering Algorithm.pptxK-Means Clustering Algorithm.pptx
K-Means Clustering Algorithm.pptx
JebaRaj26
 
Data preprocessing using Machine Learning
Data  preprocessing using Machine Learning Data  preprocessing using Machine Learning
Data preprocessing using Machine Learning
Gopal Sakarkar
 
Classification and regression trees (cart)
Classification and regression trees (cart)Classification and regression trees (cart)
Classification and regression trees (cart)
Learnbay Datascience
 
Data mining :Concepts and Techniques Chapter 2, data
Data mining :Concepts and Techniques Chapter 2, dataData mining :Concepts and Techniques Chapter 2, data
Data mining :Concepts and Techniques Chapter 2, data
Salah Amean
 
Over fitting underfitting
Over fitting underfittingOver fitting underfitting
Over fitting underfitting
SivapriyaS12
 
Machine Learning with Decision trees
Machine Learning with Decision treesMachine Learning with Decision trees
Machine Learning with Decision trees
Knoldus Inc.
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
YashwantGahlot1
 
Decision trees in Machine Learning
Decision trees in Machine Learning Decision trees in Machine Learning
Decision trees in Machine Learning
Mohammad Junaid Khan
 
Bias and variance trade off
Bias and variance trade offBias and variance trade off
Bias and variance trade off
VARUN KUMAR
 
Clustering
ClusteringClustering
Clustering
M Rizwan Aqeel
 
Cross validation.pptx
Cross validation.pptxCross validation.pptx
Cross validation.pptx
YouKnowwho28
 
dimension reduction.ppt
dimension reduction.pptdimension reduction.ppt
dimension reduction.ppt
Deadpool120050
 
Data Mining: clustering and analysis
Data Mining: clustering and analysisData Mining: clustering and analysis
Data Mining: clustering and analysis
DataminingTools Inc
 
Probabilistic Reasoning
Probabilistic ReasoningProbabilistic Reasoning
Probabilistic Reasoning
Junya Tanaka
 
Overfitting & Underfitting
Overfitting & UnderfittingOverfitting & Underfitting
Overfitting & Underfitting
SOUMIT KAR
 
Feature selection
Feature selectionFeature selection
Feature selection
Dong Guo
 
Performance Metrics for Machine Learning Algorithms
Performance Metrics for Machine Learning AlgorithmsPerformance Metrics for Machine Learning Algorithms
Performance Metrics for Machine Learning Algorithms
Kush Kulshrestha
 
07 dimensionality reduction
07 dimensionality reduction07 dimensionality reduction
07 dimensionality reduction
Marco Quartulli
 
Cross-validation Tutorial: What, how and which?
Cross-validation Tutorial: What, how and which?Cross-validation Tutorial: What, how and which?
Cross-validation Tutorial: What, how and which?
Pradeep Redddy Raamana
 
Eigen-Decomposition: Eigenvalues and Eigenvectors.pdf
Eigen-Decomposition: Eigenvalues and Eigenvectors.pdfEigen-Decomposition: Eigenvalues and Eigenvectors.pdf
Eigen-Decomposition: Eigenvalues and Eigenvectors.pdf
NehaVerma933923
 
K-Means Clustering Algorithm.pptx
K-Means Clustering Algorithm.pptxK-Means Clustering Algorithm.pptx
K-Means Clustering Algorithm.pptx
JebaRaj26
 
Data preprocessing using Machine Learning
Data  preprocessing using Machine Learning Data  preprocessing using Machine Learning
Data preprocessing using Machine Learning
Gopal Sakarkar
 
Classification and regression trees (cart)
Classification and regression trees (cart)Classification and regression trees (cart)
Classification and regression trees (cart)
Learnbay Datascience
 
Data mining :Concepts and Techniques Chapter 2, data
Data mining :Concepts and Techniques Chapter 2, dataData mining :Concepts and Techniques Chapter 2, data
Data mining :Concepts and Techniques Chapter 2, data
Salah Amean
 
Over fitting underfitting
Over fitting underfittingOver fitting underfitting
Over fitting underfitting
SivapriyaS12
 
Machine Learning with Decision trees
Machine Learning with Decision treesMachine Learning with Decision trees
Machine Learning with Decision trees
Knoldus Inc.
 
Decision trees in Machine Learning
Decision trees in Machine Learning Decision trees in Machine Learning
Decision trees in Machine Learning
Mohammad Junaid Khan
 
Bias and variance trade off
Bias and variance trade offBias and variance trade off
Bias and variance trade off
VARUN KUMAR
 
Cross validation.pptx
Cross validation.pptxCross validation.pptx
Cross validation.pptx
YouKnowwho28
 
dimension reduction.ppt
dimension reduction.pptdimension reduction.ppt
dimension reduction.ppt
Deadpool120050
 
Data Mining: clustering and analysis
Data Mining: clustering and analysisData Mining: clustering and analysis
Data Mining: clustering and analysis
DataminingTools Inc
 
Probabilistic Reasoning
Probabilistic ReasoningProbabilistic Reasoning
Probabilistic Reasoning
Junya Tanaka
 
Overfitting & Underfitting
Overfitting & UnderfittingOverfitting & Underfitting
Overfitting & Underfitting
SOUMIT KAR
 
Feature selection
Feature selectionFeature selection
Feature selection
Dong Guo
 

Similar to CONFUSION MATRIX.ppt (20)

clustering, k-mean clustering, confusion matrices
clustering, k-mean clustering, confusion matricesclustering, k-mean clustering, confusion matrices
clustering, k-mean clustering, confusion matrices
SteffinAlex
 
Lecture 10 - Model Testing and Evaluation, a lecture in subject module Statis...
Lecture 10 - Model Testing and Evaluation, a lecture in subject module Statis...Lecture 10 - Model Testing and Evaluation, a lecture in subject module Statis...
Lecture 10 - Model Testing and Evaluation, a lecture in subject module Statis...
Maninda Edirisooriya
 
UNIT IV MODEL EVALUATION and sequences.pptx
UNIT IV  MODEL EVALUATION and sequences.pptxUNIT IV  MODEL EVALUATION and sequences.pptx
UNIT IV MODEL EVALUATION and sequences.pptx
snnit
 
Performance Measurement for Machine Leaning.pptx
Performance Measurement for Machine Leaning.pptxPerformance Measurement for Machine Leaning.pptx
Performance Measurement for Machine Leaning.pptx
toneve4907
 
Lecture-12Evaluation Measures-ML.pptx
Lecture-12Evaluation Measures-ML.pptxLecture-12Evaluation Measures-ML.pptx
Lecture-12Evaluation Measures-ML.pptx
GauravSonawane51
 
evaluationmeasures-ml.pdf evaluation measures
evaluationmeasures-ml.pdf evaluation measuresevaluationmeasures-ml.pdf evaluation measures
evaluationmeasures-ml.pdf evaluation measures
shalinipriya1692
 
measures pptekejwjejejeeisjsjsjdjdjdjjddjdj
measures pptekejwjejejeeisjsjsjdjdjdjjddjdjmeasures pptekejwjejejeeisjsjsjdjdjdjjddjdj
measures pptekejwjejejeeisjsjsjdjdjdjjddjdj
palavalasasandeep407
 
Evaluating classification algorithms
Evaluating classification algorithmsEvaluating classification algorithms
Evaluating classification algorithms
Utkarsh Sharma
 
Week_8machine learning (feature selection).pptx
Week_8machine learning (feature selection).pptxWeek_8machine learning (feature selection).pptx
Week_8machine learning (feature selection).pptx
muhammadsamroz
 
Build_Machine_Learning_System for Machine Learning Course
Build_Machine_Learning_System for Machine Learning CourseBuild_Machine_Learning_System for Machine Learning Course
Build_Machine_Learning_System for Machine Learning Course
ssuserfece35
 
Boost model accuracy of imbalanced covid 19 mortality prediction
Boost model accuracy of imbalanced covid 19 mortality predictionBoost model accuracy of imbalanced covid 19 mortality prediction
Boost model accuracy of imbalanced covid 19 mortality prediction
BindhuBhargaviTalasi
 
IME 672 - Classifier Evaluation I.pptx
IME 672 - Classifier Evaluation I.pptxIME 672 - Classifier Evaluation I.pptx
IME 672 - Classifier Evaluation I.pptx
Temp762476
 
Machine Learning Unit 2 Semester 3 MSc IT Part 2 Mumbai University
Machine Learning Unit 2 Semester 3  MSc IT Part 2 Mumbai UniversityMachine Learning Unit 2 Semester 3  MSc IT Part 2 Mumbai University
Machine Learning Unit 2 Semester 3 MSc IT Part 2 Mumbai University
Madhav Mishra
 
Evaluation measures Data Science Course.pptx
Evaluation measures Data Science Course.pptxEvaluation measures Data Science Course.pptx
Evaluation measures Data Science Course.pptx
VinayVitekari
 
Statistical Learning and Model Selection (1).pptx
Statistical Learning and Model Selection (1).pptxStatistical Learning and Model Selection (1).pptx
Statistical Learning and Model Selection (1).pptx
rajalakshmi5921
 
Evaluation presentation on ai project cycle
Evaluation presentation on ai project cycleEvaluation presentation on ai project cycle
Evaluation presentation on ai project cycle
iloveyoushajan
 
Performance of the classification algorithm
Performance of the classification algorithmPerformance of the classification algorithm
Performance of the classification algorithm
Hoopeer Hoopeer
 
ML-ChapterFour-ModelEvaluation.pptx
ML-ChapterFour-ModelEvaluation.pptxML-ChapterFour-ModelEvaluation.pptx
ML-ChapterFour-ModelEvaluation.pptx
belay41
 
featurers_Machinelearning___________.pdf
featurers_Machinelearning___________.pdffeaturers_Machinelearning___________.pdf
featurers_Machinelearning___________.pdf
AmirMohamedNabilSale
 
Inferential Statistics.pptx
Inferential Statistics.pptxInferential Statistics.pptx
Inferential Statistics.pptx
jonatanjohn1
 
clustering, k-mean clustering, confusion matrices
clustering, k-mean clustering, confusion matricesclustering, k-mean clustering, confusion matrices
clustering, k-mean clustering, confusion matrices
SteffinAlex
 
Lecture 10 - Model Testing and Evaluation, a lecture in subject module Statis...
Lecture 10 - Model Testing and Evaluation, a lecture in subject module Statis...Lecture 10 - Model Testing and Evaluation, a lecture in subject module Statis...
Lecture 10 - Model Testing and Evaluation, a lecture in subject module Statis...
Maninda Edirisooriya
 
UNIT IV MODEL EVALUATION and sequences.pptx
UNIT IV  MODEL EVALUATION and sequences.pptxUNIT IV  MODEL EVALUATION and sequences.pptx
UNIT IV MODEL EVALUATION and sequences.pptx
snnit
 
Performance Measurement for Machine Leaning.pptx
Performance Measurement for Machine Leaning.pptxPerformance Measurement for Machine Leaning.pptx
Performance Measurement for Machine Leaning.pptx
toneve4907
 
Lecture-12Evaluation Measures-ML.pptx
Lecture-12Evaluation Measures-ML.pptxLecture-12Evaluation Measures-ML.pptx
Lecture-12Evaluation Measures-ML.pptx
GauravSonawane51
 
evaluationmeasures-ml.pdf evaluation measures
evaluationmeasures-ml.pdf evaluation measuresevaluationmeasures-ml.pdf evaluation measures
evaluationmeasures-ml.pdf evaluation measures
shalinipriya1692
 
measures pptekejwjejejeeisjsjsjdjdjdjjddjdj
measures pptekejwjejejeeisjsjsjdjdjdjjddjdjmeasures pptekejwjejejeeisjsjsjdjdjdjjddjdj
measures pptekejwjejejeeisjsjsjdjdjdjjddjdj
palavalasasandeep407
 
Evaluating classification algorithms
Evaluating classification algorithmsEvaluating classification algorithms
Evaluating classification algorithms
Utkarsh Sharma
 
Week_8machine learning (feature selection).pptx
Week_8machine learning (feature selection).pptxWeek_8machine learning (feature selection).pptx
Week_8machine learning (feature selection).pptx
muhammadsamroz
 
Build_Machine_Learning_System for Machine Learning Course
Build_Machine_Learning_System for Machine Learning CourseBuild_Machine_Learning_System for Machine Learning Course
Build_Machine_Learning_System for Machine Learning Course
ssuserfece35
 
Boost model accuracy of imbalanced covid 19 mortality prediction
Boost model accuracy of imbalanced covid 19 mortality predictionBoost model accuracy of imbalanced covid 19 mortality prediction
Boost model accuracy of imbalanced covid 19 mortality prediction
BindhuBhargaviTalasi
 
IME 672 - Classifier Evaluation I.pptx
IME 672 - Classifier Evaluation I.pptxIME 672 - Classifier Evaluation I.pptx
IME 672 - Classifier Evaluation I.pptx
Temp762476
 
Machine Learning Unit 2 Semester 3 MSc IT Part 2 Mumbai University
Machine Learning Unit 2 Semester 3  MSc IT Part 2 Mumbai UniversityMachine Learning Unit 2 Semester 3  MSc IT Part 2 Mumbai University
Machine Learning Unit 2 Semester 3 MSc IT Part 2 Mumbai University
Madhav Mishra
 
Evaluation measures Data Science Course.pptx
Evaluation measures Data Science Course.pptxEvaluation measures Data Science Course.pptx
Evaluation measures Data Science Course.pptx
VinayVitekari
 
Statistical Learning and Model Selection (1).pptx
Statistical Learning and Model Selection (1).pptxStatistical Learning and Model Selection (1).pptx
Statistical Learning and Model Selection (1).pptx
rajalakshmi5921
 
Evaluation presentation on ai project cycle
Evaluation presentation on ai project cycleEvaluation presentation on ai project cycle
Evaluation presentation on ai project cycle
iloveyoushajan
 
Performance of the classification algorithm
Performance of the classification algorithmPerformance of the classification algorithm
Performance of the classification algorithm
Hoopeer Hoopeer
 
ML-ChapterFour-ModelEvaluation.pptx
ML-ChapterFour-ModelEvaluation.pptxML-ChapterFour-ModelEvaluation.pptx
ML-ChapterFour-ModelEvaluation.pptx
belay41
 
featurers_Machinelearning___________.pdf
featurers_Machinelearning___________.pdffeaturers_Machinelearning___________.pdf
featurers_Machinelearning___________.pdf
AmirMohamedNabilSale
 
Inferential Statistics.pptx
Inferential Statistics.pptxInferential Statistics.pptx
Inferential Statistics.pptx
jonatanjohn1
 
Ad

Recently uploaded (20)

AllContacts Vs AllSubscribers - SFMC.pptx
AllContacts Vs AllSubscribers - SFMC.pptxAllContacts Vs AllSubscribers - SFMC.pptx
AllContacts Vs AllSubscribers - SFMC.pptx
bpkr84
 
How to join illuminati Agent in uganda call+256776963507/0741506136
How to join illuminati Agent in uganda call+256776963507/0741506136How to join illuminati Agent in uganda call+256776963507/0741506136
How to join illuminati Agent in uganda call+256776963507/0741506136
illuminati Agent uganda call+256776963507/0741506136
 
Shotgun detailed overview my this ppt formate
Shotgun detailed overview my this ppt formateShotgun detailed overview my this ppt formate
Shotgun detailed overview my this ppt formate
freefreefire0998
 
Template_A3nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
Template_A3nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnTemplate_A3nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
Template_A3nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
cegiver630
 
brainstorming-techniques-infographics.pptx
brainstorming-techniques-infographics.pptxbrainstorming-techniques-infographics.pptx
brainstorming-techniques-infographics.pptx
maritzacastro321
 
presentation of first program exist.pptx
presentation of first program exist.pptxpresentation of first program exist.pptx
presentation of first program exist.pptx
MajidAzeemChohan
 
Data Science Courses in India iim skills
Data Science Courses in India iim skillsData Science Courses in India iim skills
Data Science Courses in India iim skills
dharnathakur29
 
Data Analytics Overview and its applications
Data Analytics Overview and its applicationsData Analytics Overview and its applications
Data Analytics Overview and its applications
JanmejayaMishra7
 
DPR_Expert_Recruitment_notice_Revised.pdf
DPR_Expert_Recruitment_notice_Revised.pdfDPR_Expert_Recruitment_notice_Revised.pdf
DPR_Expert_Recruitment_notice_Revised.pdf
inmishra17121973
 
Chromatography_Detailed_Information.docx
Chromatography_Detailed_Information.docxChromatography_Detailed_Information.docx
Chromatography_Detailed_Information.docx
NohaSalah45
 
Secure_File_Storage_Hybrid_Cryptography.pptx..
Secure_File_Storage_Hybrid_Cryptography.pptx..Secure_File_Storage_Hybrid_Cryptography.pptx..
Secure_File_Storage_Hybrid_Cryptography.pptx..
yuvarajreddy2002
 
Flip flop presenation-Presented By Mubahir khan.pptx
Flip flop presenation-Presented By Mubahir khan.pptxFlip flop presenation-Presented By Mubahir khan.pptx
Flip flop presenation-Presented By Mubahir khan.pptx
mubashirkhan45461
 
History of Science and Technologyandits source.pptx
History of Science and Technologyandits source.pptxHistory of Science and Technologyandits source.pptx
History of Science and Technologyandits source.pptx
balongcastrojo
 
Classification_in_Machinee_Learning.pptx
Classification_in_Machinee_Learning.pptxClassification_in_Machinee_Learning.pptx
Classification_in_Machinee_Learning.pptx
wencyjorda88
 
Call illuminati Agent in uganda+256776963507/0741506136
Call illuminati Agent in uganda+256776963507/0741506136Call illuminati Agent in uganda+256776963507/0741506136
Call illuminati Agent in uganda+256776963507/0741506136
illuminati Agent uganda call+256776963507/0741506136
 
Minions Want to eat presentacion muy linda
Minions Want to eat presentacion muy lindaMinions Want to eat presentacion muy linda
Minions Want to eat presentacion muy linda
CarlaAndradesSoler1
 
Defense Against LLM Scheming 2025_04_28.pptx
Defense Against LLM Scheming 2025_04_28.pptxDefense Against LLM Scheming 2025_04_28.pptx
Defense Against LLM Scheming 2025_04_28.pptx
Greg Makowski
 
Day 1 - Lab 1 Reconnaissance Scanning with NMAP, Vulnerability Assessment wit...
Day 1 - Lab 1 Reconnaissance Scanning with NMAP, Vulnerability Assessment wit...Day 1 - Lab 1 Reconnaissance Scanning with NMAP, Vulnerability Assessment wit...
Day 1 - Lab 1 Reconnaissance Scanning with NMAP, Vulnerability Assessment wit...
Abodahab
 
shit yudh slideshare power likha point presen
shit yudh slideshare power likha point presenshit yudh slideshare power likha point presen
shit yudh slideshare power likha point presen
vishalgurjar11229
 
Conic Sectionfaggavahabaayhahahahahs.pptx
Conic Sectionfaggavahabaayhahahahahs.pptxConic Sectionfaggavahabaayhahahahahs.pptx
Conic Sectionfaggavahabaayhahahahahs.pptx
taiwanesechetan
 
AllContacts Vs AllSubscribers - SFMC.pptx
AllContacts Vs AllSubscribers - SFMC.pptxAllContacts Vs AllSubscribers - SFMC.pptx
AllContacts Vs AllSubscribers - SFMC.pptx
bpkr84
 
Shotgun detailed overview my this ppt formate
Shotgun detailed overview my this ppt formateShotgun detailed overview my this ppt formate
Shotgun detailed overview my this ppt formate
freefreefire0998
 
Template_A3nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
Template_A3nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnTemplate_A3nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
Template_A3nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
cegiver630
 
brainstorming-techniques-infographics.pptx
brainstorming-techniques-infographics.pptxbrainstorming-techniques-infographics.pptx
brainstorming-techniques-infographics.pptx
maritzacastro321
 
presentation of first program exist.pptx
presentation of first program exist.pptxpresentation of first program exist.pptx
presentation of first program exist.pptx
MajidAzeemChohan
 
Data Science Courses in India iim skills
Data Science Courses in India iim skillsData Science Courses in India iim skills
Data Science Courses in India iim skills
dharnathakur29
 
Data Analytics Overview and its applications
Data Analytics Overview and its applicationsData Analytics Overview and its applications
Data Analytics Overview and its applications
JanmejayaMishra7
 
DPR_Expert_Recruitment_notice_Revised.pdf
DPR_Expert_Recruitment_notice_Revised.pdfDPR_Expert_Recruitment_notice_Revised.pdf
DPR_Expert_Recruitment_notice_Revised.pdf
inmishra17121973
 
Chromatography_Detailed_Information.docx
Chromatography_Detailed_Information.docxChromatography_Detailed_Information.docx
Chromatography_Detailed_Information.docx
NohaSalah45
 
Secure_File_Storage_Hybrid_Cryptography.pptx..
Secure_File_Storage_Hybrid_Cryptography.pptx..Secure_File_Storage_Hybrid_Cryptography.pptx..
Secure_File_Storage_Hybrid_Cryptography.pptx..
yuvarajreddy2002
 
Flip flop presenation-Presented By Mubahir khan.pptx
Flip flop presenation-Presented By Mubahir khan.pptxFlip flop presenation-Presented By Mubahir khan.pptx
Flip flop presenation-Presented By Mubahir khan.pptx
mubashirkhan45461
 
History of Science and Technologyandits source.pptx
History of Science and Technologyandits source.pptxHistory of Science and Technologyandits source.pptx
History of Science and Technologyandits source.pptx
balongcastrojo
 
Classification_in_Machinee_Learning.pptx
Classification_in_Machinee_Learning.pptxClassification_in_Machinee_Learning.pptx
Classification_in_Machinee_Learning.pptx
wencyjorda88
 
Minions Want to eat presentacion muy linda
Minions Want to eat presentacion muy lindaMinions Want to eat presentacion muy linda
Minions Want to eat presentacion muy linda
CarlaAndradesSoler1
 
Defense Against LLM Scheming 2025_04_28.pptx
Defense Against LLM Scheming 2025_04_28.pptxDefense Against LLM Scheming 2025_04_28.pptx
Defense Against LLM Scheming 2025_04_28.pptx
Greg Makowski
 
Day 1 - Lab 1 Reconnaissance Scanning with NMAP, Vulnerability Assessment wit...
Day 1 - Lab 1 Reconnaissance Scanning with NMAP, Vulnerability Assessment wit...Day 1 - Lab 1 Reconnaissance Scanning with NMAP, Vulnerability Assessment wit...
Day 1 - Lab 1 Reconnaissance Scanning with NMAP, Vulnerability Assessment wit...
Abodahab
 
shit yudh slideshare power likha point presen
shit yudh slideshare power likha point presenshit yudh slideshare power likha point presen
shit yudh slideshare power likha point presen
vishalgurjar11229
 
Conic Sectionfaggavahabaayhahahahahs.pptx
Conic Sectionfaggavahabaayhahahahahs.pptxConic Sectionfaggavahabaayhahahahahs.pptx
Conic Sectionfaggavahabaayhahahahahs.pptx
taiwanesechetan
 
Ad

CONFUSION MATRIX.ppt

  • 2. MEANING • A tool for evaluating the performance of a classification model for a given set of test data • Provides a detailed breakdown of how well a model is performing in terms of classifying instances into different classes • For 2 prediction classes of classifiers, the matrix is of 2*2 table • For 3 classes, it is 3*3 table • The matrix is divided into two dimensions, that are predicted values and actual values. • Predicted values are values, which are predicted by the model, and actual values are true values for the given observations.
  • 3. Matrix • True Negative [TN]: Model has given prediction No, and the real or actual value was also No. • True Positive [TP]: The model has predicted yes, and the actual value was also true. • False Negative [FN]: The model has predicted no, but the actual value was Yes, it is also called as Type-II error. • False Positive [FP]: The model has predicted Yes, but the actual value was No. It is also called a Type-I error.
  • 4. Need for Confusion Matrix • Evaluates the performance of the classification models, making predictions on test data, and tells how good classification model is. • Tells the error made by the classifiers but also the type of errors such as either type-I or type-II error. • Helpful to calculate the parameters for classification model, such as accuracy, precision, etc.
  • 5. Sensitivity and Specificity • Sensitivity tells us what proportion of the positive class got correctly classified. • A simple example would be determining what proportion of the actual sick people were correctly detected by the model. • False Negative Rate (FNR) tells us what proportion of the positive class got incorrectly classified by the classifier. • A higher TPR and lower FNR are desirable since we want to classify the positive class correctly. • Specificity tells us what proportion of the negative class got correctly classified.
  • 6. Calculation using Confusion Matrix • Classification Accuracy: Defines how often the model predicts the correct output • Misclassification rate: Also termed as Error rate, and it defines how often the model gives the wrong predictions. • Precision: It can be defined as the number of correct outputs provided by the model or out of all positive classes that have predicted correctly by the model. • Recall: It is defined as the out of total positive classes, how our model predicted correctly. • F-measure: Score helps us to evaluate the recall and precision at the same time.