SlideShare a Scribd company logo
Data Science
Model Performance Metrics
(Accuracy, Precision, Recall)
Model Performance Metrics
Model performance metrics are measurements used to evaluate the
effectiveness and efficiency of a predictive model or machine learning
algorithm.
To evaluate the performance of predictive model there are metrics:
Accuracy
Precision
Recall (Sensitivity)
F1-Score
Confusion Matrix
ROC Curve and AUC
Please check the description box for the link to Machine Learning videos.
TP TN FP FN
A true positive is an outcome where the model correctly predicts the
positive class. Similarly, a true negative is an outcome where the
model correctly predicts the negative class.
A false positive is an outcome where the model incorrectly predicts
the positive class. And a false negative is an outcome where the
model incorrectly predicts the negative class.
Predicted Positive Negative
Positive
Negative
Actual
True Positive TP
True Negative TN
False Negative FN
False Positive FP
Accuracy
Accuracy: Accuracy is the ratio of the number of correct predictions and the
total number of predictions. It is calculated as-
Accuracy = (TP + TN) / (TP + TN + FP + FN)
Accuracy is useful in binary classification with balanced classes, also be used
for evaluating multiclass classification model when classes are balanced.
When classes in the dataset are highly imbalanced, meaning there is a
significant disparity in the number of instances between classes, accuracy can
be misleading. A model may achieve high accuracy by simply predicting the
majority class for every instance, ignoring the minority class entirely.
Example
let's consider a medical diagnosis scenario where we are developing a model
to predict whether a patient has a rare disease or not. Suppose we have a
dataset of 100 patients, out of which only 2 have the disease. This dataset
represents a highly imbalanced scenario.
let's say we develop a simple classifier that always predicts that a patient
does not have the disease. Despite the high accuracy of 98%, this classifier
is not useful because it fails to identify any patients with the disease. It
simply predicts that every patient is disease-free.
In such cases, evaluation metrics like precision, recall, or F1-score provide
more insightful information about the model's performance, especially
concerning its ability to correctly identify the minority class (patients with
the disease).
Precision
Precision: Precision is a measure of a model’s performance that tells us how
many of the positive predictions made by the model are actually correct. It is
calculated as-
Precision = TP / (TP + FP)
Precision is particularly useful in scenarios where the cost of false positives
is high.
The importance of precision is in music or video recommendation systems,
e-commerce websites, etc. where wrong results could lead to customer churn,
and this could be harmful to the business.
It gives us insight into the model's ability to avoid false positives, A higher
precision indicates fewer false positives.
Example
• Suppose we have a dataset of 1000 emails, out of which 200 are spam
(positive class) and 800 are not spam (negative class). After training our
spam detection model, it predicts that 250 emails are spam.
• True Positives (TP): 150 (correctly identified spam emails)
• False Positives (FP): 100 (non-spam emails incorrectly classified as
spam)
• Using these numbers, let's calculate precision:
• Precision=150/150+100=150/250 =0.6
• So, the precision of the model is 0.6 or 60%. This means that out of all
the emails predicted as spam, 60% of them are actually spam.
Recall (Sensitivity)
Recall: Also known as sensitivity or true positive rate, recall measures the
proportion of true positive predictions among all actual positive instances in
the dataset. It is calculated as-
Recall = TP / (TP + FN).
Recall is particularly useful in scenarios where capturing all positive instances
is crucial, even if it means accepting a higher rate of false positives.
In medical diagnosis, missing a positive instance (false negative) can have
severe consequences for the patient's health or even lead to loss of life. High
recall ensures that the model identifies as many positive cases as possible,
reducing the likelihood of missing critical diagnoses.
It gives us insight into the model's ability to avoid false negatives, which are
cases where patients with the disease are incorrectly diagnosed as not having
it.
Example
• Suppose we have a dataset of 100 patients who were tested for a specific
disease, where 20 patients actually have the disease (positive class), and 80
patients do not have the disease (negative class).
• After training our diagnostic model,
• True Positives (TP): 15 (patients correctly diagnosed with the disease)
• False Positives (FP): 5 (patients incorrectly diagnosed with the disease)
• False Negatives (FN): 5 (patients with the disease incorrectly diagnosed as not
having the disease)
• True Negatives (TN): 75 (patients correctly diagnosed as not having the
disease)
• Recall= 15/15+5 =15/20 =0.75
Precision vs Recall
• Precision can be seen as a
measure of quality.
• Higher precision means that an
algorithm returns more relevant
results than irrelevant ones.
• Precision measures the accuracy
of positive predictions.
• Precision is important when the
cost of false positives is high.
(e.g. spam detection).
• Recall can be seen as a measure of
quantity.
• Higher recall means that an
algorithm returns most of the
relevant results (whether irrelevant
ones are also returned).
• Recall measures the completeness
of positive predictions.
• Recall is important when the cost
of false negative is high. (e.g.
disease diagnosis)
Thanks for Watching!
Please check the description box for the link to
Machine Learning videos.

More Related Content

Similar to Model Evaluation Matrix: Accuracy, precision and recall

Performance of the classification algorithm
Performance of the classification algorithmPerformance of the classification algorithm
Performance of the classification algorithm
Hoopeer Hoopeer
 
Statistics
StatisticsStatistics
Statistics
fracpractice
 
The Lachman Test
The Lachman TestThe Lachman Test
The Lachman Test
Laura Torres
 
Basics of Sample Size Estimation
Basics of Sample Size EstimationBasics of Sample Size Estimation
Basics of Sample Size Estimation
Mandar Baviskar
 
Unit 9b. Sample size estimation.ppt
Unit 9b. Sample size estimation.pptUnit 9b. Sample size estimation.ppt
Unit 9b. Sample size estimation.ppt
shakirRahman10
 
Calculating a Sample Size
Calculating a Sample SizeCalculating a Sample Size
Calculating a Sample Size
Matt Hansen
 
Assessing Model Performance - Beginner's Guide
Assessing Model Performance - Beginner's GuideAssessing Model Performance - Beginner's Guide
Assessing Model Performance - Beginner's Guide
Megan Verbakel
 
Model Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUC
Model Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUCModel Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUC
Model Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUC
Megha Sharma
 
Presentation on key concepts.ppt
Presentation on key concepts.pptPresentation on key concepts.ppt
Presentation on key concepts.ppt
JamesMajok1
 
Estimating a Population Proportion
Estimating a Population ProportionEstimating a Population Proportion
Estimating a Population Proportion
Long Beach City College
 
Estimating a Population Proportion
Estimating a Population ProportionEstimating a Population Proportion
Estimating a Population Proportion
Long Beach City College
 
Quantitative critical appraisal october 2015
Quantitative critical appraisal october 2015Quantitative critical appraisal october 2015
Quantitative critical appraisal october 2015
Isla Kuhn
 
Sample size determination
Sample size determinationSample size determination
Sample size determination
Augustine Gatimu
 
Critical Appriaisal Skills Basic 1 | May 4th 2011
Critical Appriaisal Skills Basic 1 | May 4th 2011Critical Appriaisal Skills Basic 1 | May 4th 2011
Critical Appriaisal Skills Basic 1 | May 4th 2011
NES
 
Sensitivity and Specificity in Predictive Modeling
Sensitivity and Specificity in Predictive ModelingSensitivity and Specificity in Predictive Modeling
Sensitivity and Specificity in Predictive Modeling
Sarajit Poddar, GPHR, HRMP
 
RMH Concise Revision Guide - the Basics of EBM
RMH Concise Revision Guide -  the Basics of EBMRMH Concise Revision Guide -  the Basics of EBM
RMH Concise Revision Guide - the Basics of EBM
AyselTuracli
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
Shivasharana Marnur
 
Chi square
Chi squareChi square
Chi square
utpal sharma
 
How to do the maths
How to do the mathsHow to do the maths
How to do the maths
Ahmed Elfaitury
 

Similar to Model Evaluation Matrix: Accuracy, precision and recall (20)

Performance of the classification algorithm
Performance of the classification algorithmPerformance of the classification algorithm
Performance of the classification algorithm
 
Statistics
StatisticsStatistics
Statistics
 
The Lachman Test
The Lachman TestThe Lachman Test
The Lachman Test
 
Basics of Sample Size Estimation
Basics of Sample Size EstimationBasics of Sample Size Estimation
Basics of Sample Size Estimation
 
Unit 9b. Sample size estimation.ppt
Unit 9b. Sample size estimation.pptUnit 9b. Sample size estimation.ppt
Unit 9b. Sample size estimation.ppt
 
Calculating a Sample Size
Calculating a Sample SizeCalculating a Sample Size
Calculating a Sample Size
 
Assessing Model Performance - Beginner's Guide
Assessing Model Performance - Beginner's GuideAssessing Model Performance - Beginner's Guide
Assessing Model Performance - Beginner's Guide
 
Model Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUC
Model Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUCModel Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUC
Model Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUC
 
Presentation on key concepts.ppt
Presentation on key concepts.pptPresentation on key concepts.ppt
Presentation on key concepts.ppt
 
Estimating a Population Proportion
Estimating a Population ProportionEstimating a Population Proportion
Estimating a Population Proportion
 
Estimating a Population Proportion
Estimating a Population ProportionEstimating a Population Proportion
Estimating a Population Proportion
 
Quantitative critical appraisal october 2015
Quantitative critical appraisal october 2015Quantitative critical appraisal october 2015
Quantitative critical appraisal october 2015
 
Sample size determination
Sample size determinationSample size determination
Sample size determination
 
Critical Appriaisal Skills Basic 1 | May 4th 2011
Critical Appriaisal Skills Basic 1 | May 4th 2011Critical Appriaisal Skills Basic 1 | May 4th 2011
Critical Appriaisal Skills Basic 1 | May 4th 2011
 
Sensitivity and Specificity in Predictive Modeling
Sensitivity and Specificity in Predictive ModelingSensitivity and Specificity in Predictive Modeling
Sensitivity and Specificity in Predictive Modeling
 
Hypo
HypoHypo
Hypo
 
RMH Concise Revision Guide - the Basics of EBM
RMH Concise Revision Guide -  the Basics of EBMRMH Concise Revision Guide -  the Basics of EBM
RMH Concise Revision Guide - the Basics of EBM
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
Chi square
Chi squareChi square
Chi square
 
How to do the maths
How to do the mathsHow to do the maths
How to do the maths
 

More from Megha Sharma

Data Management Activities, Extraction, Transformation and Loading (ETL)
Data Management Activities, Extraction, Transformation and Loading (ETL)Data Management Activities, Extraction, Transformation and Loading (ETL)
Data Management Activities, Extraction, Transformation and Loading (ETL)
Megha Sharma
 
Descriptive Statistics: Mean, Median Mode and Standard Deviation.
Descriptive Statistics: Mean, Median Mode and Standard Deviation.Descriptive Statistics: Mean, Median Mode and Standard Deviation.
Descriptive Statistics: Mean, Median Mode and Standard Deviation.
Megha Sharma
 
Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.
Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.
Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.
Megha Sharma
 
Visualization Techniques ,Exploratory Data Analysis(EDA), Histogram
Visualization Techniques ,Exploratory Data Analysis(EDA), HistogramVisualization Techniques ,Exploratory Data Analysis(EDA), Histogram
Visualization Techniques ,Exploratory Data Analysis(EDA), Histogram
Megha Sharma
 
Data Preprocessing- Data transformation, Scaling, Normalization, Standardiza...
Data Preprocessing- Data transformation,  Scaling, Normalization, Standardiza...Data Preprocessing- Data transformation,  Scaling, Normalization, Standardiza...
Data Preprocessing- Data transformation, Scaling, Normalization, Standardiza...
Megha Sharma
 
Data Science- Data Preprocessing, Data Cleaning.
Data Science- Data Preprocessing, Data Cleaning.Data Science- Data Preprocessing, Data Cleaning.
Data Science- Data Preprocessing, Data Cleaning.
Megha Sharma
 
Data Preprocessing- Feature Selection and Merging.
Data Preprocessing- Feature Selection and Merging.Data Preprocessing- Feature Selection and Merging.
Data Preprocessing- Feature Selection and Merging.
Megha Sharma
 
Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...
Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...
Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...
Megha Sharma
 
Data Science comparison with AI, ML, BI, and data warehousing, data mining.
Data Science comparison with AI, ML, BI, and data warehousing, data mining.Data Science comparison with AI, ML, BI, and data warehousing, data mining.
Data Science comparison with AI, ML, BI, and data warehousing, data mining.
Megha Sharma
 
Data Science Introduction, Application of Data Science.
Data Science Introduction, Application of Data Science.Data Science Introduction, Application of Data Science.
Data Science Introduction, Application of Data Science.
Megha Sharma
 
Ensemble learning
Ensemble learningEnsemble learning
Ensemble learning
Megha Sharma
 
Association Rule mining
Association Rule miningAssociation Rule mining
Association Rule mining
Megha Sharma
 
Bellman's equation Reinforcement learning - II
Bellman's equation Reinforcement learning - IIBellman's equation Reinforcement learning - II
Bellman's equation Reinforcement learning - II
Megha Sharma
 
Reinforcement learning in Machine learning
 Reinforcement learning in Machine learning Reinforcement learning in Machine learning
Reinforcement learning in Machine learning
Megha Sharma
 
E-M Algorithm
E-M AlgorithmE-M Algorithm
E-M Algorithm
Megha Sharma
 
Entropy and information gain in decision tree.
Entropy and information gain in decision tree.Entropy and information gain in decision tree.
Entropy and information gain in decision tree.
Megha Sharma
 
Types of Machine Learning. & Decision Tree.
Types of Machine Learning. & Decision Tree.Types of Machine Learning. & Decision Tree.
Types of Machine Learning. & Decision Tree.
Megha Sharma
 
If statements in C
If statements in CIf statements in C
If statements in C
Megha Sharma
 
Conditional and special operators
Conditional and special operatorsConditional and special operators
Conditional and special operators
Megha Sharma
 
Assignment operators
Assignment operatorsAssignment operators
Assignment operators
Megha Sharma
 

More from Megha Sharma (20)

Data Management Activities, Extraction, Transformation and Loading (ETL)
Data Management Activities, Extraction, Transformation and Loading (ETL)Data Management Activities, Extraction, Transformation and Loading (ETL)
Data Management Activities, Extraction, Transformation and Loading (ETL)
 
Descriptive Statistics: Mean, Median Mode and Standard Deviation.
Descriptive Statistics: Mean, Median Mode and Standard Deviation.Descriptive Statistics: Mean, Median Mode and Standard Deviation.
Descriptive Statistics: Mean, Median Mode and Standard Deviation.
 
Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.
Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.
Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.
 
Visualization Techniques ,Exploratory Data Analysis(EDA), Histogram
Visualization Techniques ,Exploratory Data Analysis(EDA), HistogramVisualization Techniques ,Exploratory Data Analysis(EDA), Histogram
Visualization Techniques ,Exploratory Data Analysis(EDA), Histogram
 
Data Preprocessing- Data transformation, Scaling, Normalization, Standardiza...
Data Preprocessing- Data transformation,  Scaling, Normalization, Standardiza...Data Preprocessing- Data transformation,  Scaling, Normalization, Standardiza...
Data Preprocessing- Data transformation, Scaling, Normalization, Standardiza...
 
Data Science- Data Preprocessing, Data Cleaning.
Data Science- Data Preprocessing, Data Cleaning.Data Science- Data Preprocessing, Data Cleaning.
Data Science- Data Preprocessing, Data Cleaning.
 
Data Preprocessing- Feature Selection and Merging.
Data Preprocessing- Feature Selection and Merging.Data Preprocessing- Feature Selection and Merging.
Data Preprocessing- Feature Selection and Merging.
 
Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...
Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...
Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...
 
Data Science comparison with AI, ML, BI, and data warehousing, data mining.
Data Science comparison with AI, ML, BI, and data warehousing, data mining.Data Science comparison with AI, ML, BI, and data warehousing, data mining.
Data Science comparison with AI, ML, BI, and data warehousing, data mining.
 
Data Science Introduction, Application of Data Science.
Data Science Introduction, Application of Data Science.Data Science Introduction, Application of Data Science.
Data Science Introduction, Application of Data Science.
 
Ensemble learning
Ensemble learningEnsemble learning
Ensemble learning
 
Association Rule mining
Association Rule miningAssociation Rule mining
Association Rule mining
 
Bellman's equation Reinforcement learning - II
Bellman's equation Reinforcement learning - IIBellman's equation Reinforcement learning - II
Bellman's equation Reinforcement learning - II
 
Reinforcement learning in Machine learning
 Reinforcement learning in Machine learning Reinforcement learning in Machine learning
Reinforcement learning in Machine learning
 
E-M Algorithm
E-M AlgorithmE-M Algorithm
E-M Algorithm
 
Entropy and information gain in decision tree.
Entropy and information gain in decision tree.Entropy and information gain in decision tree.
Entropy and information gain in decision tree.
 
Types of Machine Learning. & Decision Tree.
Types of Machine Learning. & Decision Tree.Types of Machine Learning. & Decision Tree.
Types of Machine Learning. & Decision Tree.
 
If statements in C
If statements in CIf statements in C
If statements in C
 
Conditional and special operators
Conditional and special operatorsConditional and special operators
Conditional and special operators
 
Assignment operators
Assignment operatorsAssignment operators
Assignment operators
 

Recently uploaded

Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Denish Jangid
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
ricssacare
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptxSolid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Denish Jangid
 
NCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdfNCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdf
Vivekanand Anglo Vedic Academy
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 

Recently uploaded (20)

Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptxSolid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
 
NCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdfNCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdf
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 

Model Evaluation Matrix: Accuracy, precision and recall

  • 1. Data Science Model Performance Metrics (Accuracy, Precision, Recall)
  • 2. Model Performance Metrics Model performance metrics are measurements used to evaluate the effectiveness and efficiency of a predictive model or machine learning algorithm. To evaluate the performance of predictive model there are metrics: Accuracy Precision Recall (Sensitivity) F1-Score Confusion Matrix ROC Curve and AUC Please check the description box for the link to Machine Learning videos.
  • 3. TP TN FP FN A true positive is an outcome where the model correctly predicts the positive class. Similarly, a true negative is an outcome where the model correctly predicts the negative class. A false positive is an outcome where the model incorrectly predicts the positive class. And a false negative is an outcome where the model incorrectly predicts the negative class. Predicted Positive Negative Positive Negative Actual True Positive TP True Negative TN False Negative FN False Positive FP
  • 4. Accuracy Accuracy: Accuracy is the ratio of the number of correct predictions and the total number of predictions. It is calculated as- Accuracy = (TP + TN) / (TP + TN + FP + FN) Accuracy is useful in binary classification with balanced classes, also be used for evaluating multiclass classification model when classes are balanced. When classes in the dataset are highly imbalanced, meaning there is a significant disparity in the number of instances between classes, accuracy can be misleading. A model may achieve high accuracy by simply predicting the majority class for every instance, ignoring the minority class entirely.
  • 5. Example let's consider a medical diagnosis scenario where we are developing a model to predict whether a patient has a rare disease or not. Suppose we have a dataset of 100 patients, out of which only 2 have the disease. This dataset represents a highly imbalanced scenario. let's say we develop a simple classifier that always predicts that a patient does not have the disease. Despite the high accuracy of 98%, this classifier is not useful because it fails to identify any patients with the disease. It simply predicts that every patient is disease-free. In such cases, evaluation metrics like precision, recall, or F1-score provide more insightful information about the model's performance, especially concerning its ability to correctly identify the minority class (patients with the disease).
  • 6. Precision Precision: Precision is a measure of a model’s performance that tells us how many of the positive predictions made by the model are actually correct. It is calculated as- Precision = TP / (TP + FP) Precision is particularly useful in scenarios where the cost of false positives is high. The importance of precision is in music or video recommendation systems, e-commerce websites, etc. where wrong results could lead to customer churn, and this could be harmful to the business. It gives us insight into the model's ability to avoid false positives, A higher precision indicates fewer false positives.
  • 7. Example • Suppose we have a dataset of 1000 emails, out of which 200 are spam (positive class) and 800 are not spam (negative class). After training our spam detection model, it predicts that 250 emails are spam. • True Positives (TP): 150 (correctly identified spam emails) • False Positives (FP): 100 (non-spam emails incorrectly classified as spam) • Using these numbers, let's calculate precision: • Precision=150/150+100=150/250 =0.6 • So, the precision of the model is 0.6 or 60%. This means that out of all the emails predicted as spam, 60% of them are actually spam.
  • 8. Recall (Sensitivity) Recall: Also known as sensitivity or true positive rate, recall measures the proportion of true positive predictions among all actual positive instances in the dataset. It is calculated as- Recall = TP / (TP + FN). Recall is particularly useful in scenarios where capturing all positive instances is crucial, even if it means accepting a higher rate of false positives. In medical diagnosis, missing a positive instance (false negative) can have severe consequences for the patient's health or even lead to loss of life. High recall ensures that the model identifies as many positive cases as possible, reducing the likelihood of missing critical diagnoses. It gives us insight into the model's ability to avoid false negatives, which are cases where patients with the disease are incorrectly diagnosed as not having it.
  • 9. Example • Suppose we have a dataset of 100 patients who were tested for a specific disease, where 20 patients actually have the disease (positive class), and 80 patients do not have the disease (negative class). • After training our diagnostic model, • True Positives (TP): 15 (patients correctly diagnosed with the disease) • False Positives (FP): 5 (patients incorrectly diagnosed with the disease) • False Negatives (FN): 5 (patients with the disease incorrectly diagnosed as not having the disease) • True Negatives (TN): 75 (patients correctly diagnosed as not having the disease) • Recall= 15/15+5 =15/20 =0.75
  • 10. Precision vs Recall • Precision can be seen as a measure of quality. • Higher precision means that an algorithm returns more relevant results than irrelevant ones. • Precision measures the accuracy of positive predictions. • Precision is important when the cost of false positives is high. (e.g. spam detection). • Recall can be seen as a measure of quantity. • Higher recall means that an algorithm returns most of the relevant results (whether irrelevant ones are also returned). • Recall measures the completeness of positive predictions. • Recall is important when the cost of false negative is high. (e.g. disease diagnosis)
  • 11. Thanks for Watching! Please check the description box for the link to Machine Learning videos.