SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
Performance Metrics
Confusion Matrix, ROC curve, AUC, F1 score
Evaluation of Outlier Detection – ROC & AUC
• Standard measures for evaluating anomaly detection problems:
• Recall (Detection rate) - Ratio between the number of correctly detected
anomalies and the total number of anomalies
• False alarm (false positive) rate – Ratio between the number of data
records from normal class that are misclassified as anomalies and the
total number of data records from normal class
• ROC Curve is a trade-off between detection rate (TPR) and false alarm
rate (FPR).
• Area under the ROC curve (AUC) is computed using a trapezoid rule.
Predicted
class
Confusion
matrix
NC C
NC TN FP
Actual
class C FN TP
anomaly class – C
normal class – NC
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
ROC curves for different outlier detection techniques
False alarm rate
Detection
rate
AUC
Ideal
ROC
curve
Evaluation of Anomaly Detection – F(or F1)-Score
Predicted
class
Confusion
matrix
NC C
NC TN FP
Actual
class C FN TP
anomaly class – C
normal class – NC
– Accuracy = (TP+TN) / (TP+TN+FP+FN)
– Precision (P) = TP / (TP + FP)
– Recall (R) = TP / (TP + FN)
• F1 Score focuses on both recall and precision
• F – measure = 2*R*P / (R+P)
Why F(or F1) - Score is need?
Difference between F1 Score and Accuracy
• Accuracy is contributed by a large number of True Negatives
• Not considers much on False Negative and False Positive usually has business costs (tangible &
intangible).
• F1 Score is better measure to use if need a balance between Precision and Recall and there is an
uneven class distribution (large number of Actual Negatives).
 Accuracy is not sufficient metric for evaluation
• Example: network traffic data set with 99.9% of normal data and 0.1% of intrusions
• Trivial classifier that labels everything with the normal class can achieve 99.9% accuracy

More Related Content

PDF
Performance Metrics for Machine Learning Algorithms
PPT
Machine Learning presentation.
PDF
03 Machine Learning Linear Algebra
PPT
Decision tree
PDF
An introduction to Machine Learning
PPTX
Deep Learning With Python | Deep Learning And Neural Networks | Deep Learning...
PPTX
K Means Clustering Algorithm | K Means Clustering Example | Machine Learning ...
PPTX
Support vector machine
Performance Metrics for Machine Learning Algorithms
Machine Learning presentation.
03 Machine Learning Linear Algebra
Decision tree
An introduction to Machine Learning
Deep Learning With Python | Deep Learning And Neural Networks | Deep Learning...
K Means Clustering Algorithm | K Means Clustering Example | Machine Learning ...
Support vector machine

What's hot (20)

PPTX
Optimization/Gradient Descent
PPTX
Perceptron & Neural Networks
PPTX
Support Vector Machine - How Support Vector Machine works | SVM in Machine Le...
PDF
Introduction to Machine Learning Classifiers
PDF
Support Vector Machines for Classification
PPTX
Feedforward neural network
PPTX
Gradient descent method
PDF
Cheatsheet unsupervised-learning
PDF
Autoencoders
PPTX
Machine learning session4(linear regression)
PDF
Model selection and cross validation techniques
PPTX
Random forest
PDF
Support Vector Machines (SVM)
 
PPT
Machine learning
PPTX
decision tree regression
PDF
02 Machine Learning - Introduction probability
PDF
bag-of-words models
PPTX
PDF
Machine Learning: Introduction to Neural Networks
PPTX
Unsupervised learning clustering
Optimization/Gradient Descent
Perceptron & Neural Networks
Support Vector Machine - How Support Vector Machine works | SVM in Machine Le...
Introduction to Machine Learning Classifiers
Support Vector Machines for Classification
Feedforward neural network
Gradient descent method
Cheatsheet unsupervised-learning
Autoencoders
Machine learning session4(linear regression)
Model selection and cross validation techniques
Random forest
Support Vector Machines (SVM)
 
Machine learning
decision tree regression
02 Machine Learning - Introduction probability
bag-of-words models
Machine Learning: Introduction to Neural Networks
Unsupervised learning clustering
Ad

Similar to Machine Learning Performance metrics for classification (20)

PPTX
Model Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUC
PPTX
lecture-12evaluationmeasures-ml-221219130248-3522ee79.pptx eval
PDF
evaluationmeasures-ml.pdf evaluation measures
PPTX
Lecture-12Evaluation Measures-ML.pptx
PDF
Classification assessment methods
PDF
3Assessing classification performance.pdf
PPTX
Confusion Matrix.pptx
PPTX
MACHINE LEARNING PPT K MEANS CLUSTERING.
PPTX
Classification Evaluation Metrics (2).pptx
PPTX
Performance Measurement for Machine Leaning.pptx
PPTX
Important Classification and Regression Metrics.pptx
PPT
CONFUSION MATRIX.ppt
PPTX
Model_Evaluation_Metrics_Presentation.pptx
PPTX
Model_Evaluation_Metrics_Presentation.pptx
PPTX
ML-ChapterFour-ModelEvaluation.pptx
PPTX
Evaluating classification algorithms
PPTX
Module 3_ Classification.pptx
PPTX
MLA_Confusion Matrix for Classification
PPT
Lecture11_ Evaluation Metrics for classification.ppt
PDF
Confusion matrix and classification evaluation metrics
Model Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUC
lecture-12evaluationmeasures-ml-221219130248-3522ee79.pptx eval
evaluationmeasures-ml.pdf evaluation measures
Lecture-12Evaluation Measures-ML.pptx
Classification assessment methods
3Assessing classification performance.pdf
Confusion Matrix.pptx
MACHINE LEARNING PPT K MEANS CLUSTERING.
Classification Evaluation Metrics (2).pptx
Performance Measurement for Machine Leaning.pptx
Important Classification and Regression Metrics.pptx
CONFUSION MATRIX.ppt
Model_Evaluation_Metrics_Presentation.pptx
Model_Evaluation_Metrics_Presentation.pptx
ML-ChapterFour-ModelEvaluation.pptx
Evaluating classification algorithms
Module 3_ Classification.pptx
MLA_Confusion Matrix for Classification
Lecture11_ Evaluation Metrics for classification.ppt
Confusion matrix and classification evaluation metrics
Ad

More from Kuppusamy P (20)

PDF
Recurrent neural networks rnn
PDF
Deep learning
PDF
Image segmentation
PDF
Image enhancement
PDF
Feature detection and matching
PDF
Image processing, Noise, Noise Removal filters
PDF
Flowchart design for algorithms
PDF
Algorithm basics
PDF
Problem solving using Programming
PDF
Parts of Computer, Hardware and Software
PDF
Strings in java
PDF
Java methods or Subroutines or Functions
PDF
Java arrays
PDF
Java iterative statements
PDF
Java conditional statements
PDF
Java data types
PDF
Java introduction
PDF
Logistic regression in Machine Learning
PDF
Anomaly detection (Unsupervised Learning) in Machine Learning
PDF
Machine learning Introduction
Recurrent neural networks rnn
Deep learning
Image segmentation
Image enhancement
Feature detection and matching
Image processing, Noise, Noise Removal filters
Flowchart design for algorithms
Algorithm basics
Problem solving using Programming
Parts of Computer, Hardware and Software
Strings in java
Java methods or Subroutines or Functions
Java arrays
Java iterative statements
Java conditional statements
Java data types
Java introduction
Logistic regression in Machine Learning
Anomaly detection (Unsupervised Learning) in Machine Learning
Machine learning Introduction

Recently uploaded (20)

PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Pharma ospi slides which help in ospi learning
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Institutional Correction lecture only . . .
PPTX
Cell Structure & Organelles in detailed.
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Microbial disease of the cardiovascular and lymphatic systems
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
TR - Agricultural Crops Production NC III.pdf
01-Introduction-to-Information-Management.pdf
Microbial diseases, their pathogenesis and prophylaxis
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Pharma ospi slides which help in ospi learning
Renaissance Architecture: A Journey from Faith to Humanism
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
VCE English Exam - Section C Student Revision Booklet
2.FourierTransform-ShortQuestionswithAnswers.pdf
Institutional Correction lecture only . . .
Cell Structure & Organelles in detailed.
Week 4 Term 3 Study Techniques revisited.pptx
PPH.pptx obstetrics and gynecology in nursing
O5-L3 Freight Transport Ops (International) V1.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
human mycosis Human fungal infections are called human mycosis..pptx

Machine Learning Performance metrics for classification

  • 1. Performance Metrics Confusion Matrix, ROC curve, AUC, F1 score
  • 2. Evaluation of Outlier Detection – ROC & AUC • Standard measures for evaluating anomaly detection problems: • Recall (Detection rate) - Ratio between the number of correctly detected anomalies and the total number of anomalies • False alarm (false positive) rate – Ratio between the number of data records from normal class that are misclassified as anomalies and the total number of data records from normal class • ROC Curve is a trade-off between detection rate (TPR) and false alarm rate (FPR). • Area under the ROC curve (AUC) is computed using a trapezoid rule. Predicted class Confusion matrix NC C NC TN FP Actual class C FN TP anomaly class – C normal class – NC 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 ROC curves for different outlier detection techniques False alarm rate Detection rate AUC Ideal ROC curve
  • 3. Evaluation of Anomaly Detection – F(or F1)-Score Predicted class Confusion matrix NC C NC TN FP Actual class C FN TP anomaly class – C normal class – NC – Accuracy = (TP+TN) / (TP+TN+FP+FN) – Precision (P) = TP / (TP + FP) – Recall (R) = TP / (TP + FN) • F1 Score focuses on both recall and precision • F – measure = 2*R*P / (R+P)
  • 4. Why F(or F1) - Score is need? Difference between F1 Score and Accuracy • Accuracy is contributed by a large number of True Negatives • Not considers much on False Negative and False Positive usually has business costs (tangible & intangible). • F1 Score is better measure to use if need a balance between Precision and Recall and there is an uneven class distribution (large number of Actual Negatives).  Accuracy is not sufficient metric for evaluation • Example: network traffic data set with 99.9% of normal data and 0.1% of intrusions • Trivial classifier that labels everything with the normal class can achieve 99.9% accuracy