SlideShare a Scribd company logo
1 of 8
ROC- AUC Curve
21-11-2021 1
Department of Computer Science and Engineering
National Institute of Technology Silchar, Assam, INDIA
By-
Nurul Amin Choudhury
NIT Silchar - PhD Scholar
21-11-2021 2
ROC – AUC Curve
• Main idea: Receiver Operating Curve (ROC) shows the performance of the classification model at different
threshold settings.
• ROC is a probability curve and AUC represents the degree or measure of separability.
• It tells how much the model is capable of distinguishing between classes.
• Higher the AUC, the better the model is at predicting 0 classes as 0 and 1 classes as 1.
• It is consider that Higher the AUC, the better the model is at distinguishing between patients with the
disease and no disease.
• The ROC curve is plotted with True Positive Rate (TPR) against the False Positive Rate (FPR) where
TPR is on the y-axis and FPR is on the x-axis.
21-11-2021 3
Cntd…
Fig. 1. ROC-AUC Curve.
Image courtesy: My Photoshopped Collection
TPR =
𝑻𝒑
𝑻𝑷
+𝑭𝒏
• The TPR and FPR is given by-
FPR =
𝑭𝒑
𝑻𝒏
+𝑭𝒑
• It is considered that more the AUC, better the model in classifying positive class as positive and negative as
negative.
AUC
21-11-2021 4
Example Problem-
• Suppose, a classification model yields the classification probability as shown in Table 1.
Step 1 - Let us set the different Threshold as 𝜶 = [0 , 0.2, 0.4, 0.8, 1]
Step 2 - Taking first threshold as 𝜶 = [0], we will get-
Step 3 - TPR =
4
4+0
= 1
& FPR =
2
2+0
= 1
Therefore TPR, FPR at 𝜶 = [0] is (1,1)
Output Class. Prob. (Y)
1 0.8
0 0.96
1 0.4
1 0.3
0 0.2
1 0.7
Table 1. Actual Output vs Classification
yielded Prob.
Output Class.
Prob. (Y)
At 𝜶 = [0]
Y1
1 0.8 1
0 0.96 1
1 0.4 1
1 0.3 1
0 0.2 1
1 0.7 1
Table 2. Predicted Output at 𝜶 = [0]
21-11-2021 5
Cntd… Output Class. Prob.
(Y)
At 𝜶 = [0.2]
Y1
1 0.8 1
0 0.96 1
1 0.4 1
1 0.3 1
0 0.2 0
1 0.7 1
Step 4 - Repeating all the steps from Step 1 to Step 3 at 𝜶 = [0.2], we will get-
TPR =
4
4+0
= 1
& FPR =
1
1+1
= 0.5
Therefore TPR, FPR at 𝜶 = [0.2] is (1 , 0.5)
Output Class. Prob.
(Y)
At 𝜶 = [0.4]
Y1
1 0.8 1
0 0.96 1
1 0.4 0
1 0.3 0
0 0.2 0
1 0.7 1
Step 5 - Again repeating all the steps from Step 1 to Step 3 at 𝜶 = [0.4], we will get-
TPR =
2
2+2
= 0.5
& FPR =
1
1+1
= 0.5
Therefore TPR, FPR at 𝜶 = [0.4] is (0.5 , 0.5)
Table 3. Predicted Output at 𝜶 = [0.2]
Table 4. Predicted Output at 𝜶 = [0.4]
21-11-2021 6
Cntd… Output Class. Prob.
(Y)
At 𝜶 = [0.8]
Y1
1 0.8 0
0 0.96 1
1 0.4 0
1 0.3 0
0 0.2 0
1 0.7 0
Step 6 - Repeating all the steps from Step 1 to Step 3 at 𝜶 = [0.8], we will get-
TPR =
0
0+4
=0
& FPR =
1
1+1
= 0.5
Therefore TPR, FPR at 𝜶 = [0.8] is (0 , 0.5)
Output Class. Prob.
(Y)
At 𝜶 = [1]
Y1
1 0.8 0
0 0.96 0
1 0.4 0
1 0.3 0
0 0.2 0
1 0.7 0
Step 7 - Again repeating all the steps from Step 1 to Step 3 at 𝜶 = [1], we will get-
TPR =
0
0+4
= 0
& FPR =
0
0+2
= 0
Therefore TPR, FPR at 𝜶 = [1] is (0 , 0)
Table 5. Predicted Output at 𝜶 = [0.8]
Table 6. Predicted Output at 𝜶 = [1]
Cntd…
Threshold TPR FPR
0 1 1
0.2 1 0.5
0.4 0.5 0.5
0.8 0 0.5
1 0 0
ROC Curve
Step 8 – Finally, plotting the ROC curve at different threshold setting we will get-
Table 7. TPR, FPR values at different
threshold settings.
Fig. 2. ROC-AUC Curve.
AUC
Thank You

More Related Content

What's hot

Visual Explanation of Ridge Regression and LASSO
Visual Explanation of Ridge Regression and LASSOVisual Explanation of Ridge Regression and LASSO
Visual Explanation of Ridge Regression and LASSOKazuki Yoshida
 
Exploratory Data Analysis
Exploratory Data AnalysisExploratory Data Analysis
Exploratory Data AnalysisUmair Shafique
 
Polynomial regression
Polynomial regressionPolynomial regression
Polynomial regressionnaveedaliabad
 
Logistic regression
Logistic regressionLogistic regression
Logistic regressionVARUN KUMAR
 
Ml3 logistic regression-and_classification_error_metrics
Ml3 logistic regression-and_classification_error_metricsMl3 logistic regression-and_classification_error_metrics
Ml3 logistic regression-and_classification_error_metricsankit_ppt
 
Categorical data analysis
Categorical data analysisCategorical data analysis
Categorical data analysisSumit Das
 
Logistic regression with SPSS examples
Logistic regression with SPSS examplesLogistic regression with SPSS examples
Logistic regression with SPSS examplesGaurav Kamboj
 
Linear regression
Linear regressionLinear regression
Linear regressionMartinHogg9
 
Data Science - Part XII - Ridge Regression, LASSO, and Elastic Nets
Data Science - Part XII - Ridge Regression, LASSO, and Elastic NetsData Science - Part XII - Ridge Regression, LASSO, and Elastic Nets
Data Science - Part XII - Ridge Regression, LASSO, and Elastic NetsDerek Kane
 
Different kind of distance and Statistical Distance
Different kind of distance and Statistical DistanceDifferent kind of distance and Statistical Distance
Different kind of distance and Statistical DistanceKhulna University
 
Principal component analysis and lda
Principal component analysis and ldaPrincipal component analysis and lda
Principal component analysis and ldaSuresh Pokharel
 
Non Linear Equation
Non Linear EquationNon Linear Equation
Non Linear EquationMdAlAmin187
 
Introduction to principal component analysis (pca)
Introduction to principal component analysis (pca)Introduction to principal component analysis (pca)
Introduction to principal component analysis (pca)Mohammed Musah
 
Regression analysis
Regression analysisRegression analysis
Regression analysisRavi shankar
 
Logistic regression with SPSS
Logistic regression with SPSSLogistic regression with SPSS
Logistic regression with SPSSLNIPE
 

What's hot (20)

Visual Explanation of Ridge Regression and LASSO
Visual Explanation of Ridge Regression and LASSOVisual Explanation of Ridge Regression and LASSO
Visual Explanation of Ridge Regression and LASSO
 
Exploratory Data Analysis
Exploratory Data AnalysisExploratory Data Analysis
Exploratory Data Analysis
 
Polynomial regression
Polynomial regressionPolynomial regression
Polynomial regression
 
Simple linear regression
Simple linear regressionSimple linear regression
Simple linear regression
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
 
Ml3 logistic regression-and_classification_error_metrics
Ml3 logistic regression-and_classification_error_metricsMl3 logistic regression-and_classification_error_metrics
Ml3 logistic regression-and_classification_error_metrics
 
Categorical data analysis
Categorical data analysisCategorical data analysis
Categorical data analysis
 
Logistic regression with SPSS examples
Logistic regression with SPSS examplesLogistic regression with SPSS examples
Logistic regression with SPSS examples
 
Linear regression
Linear regressionLinear regression
Linear regression
 
Blue property assumptions.
Blue property assumptions.Blue property assumptions.
Blue property assumptions.
 
Data Science - Part XII - Ridge Regression, LASSO, and Elastic Nets
Data Science - Part XII - Ridge Regression, LASSO, and Elastic NetsData Science - Part XII - Ridge Regression, LASSO, and Elastic Nets
Data Science - Part XII - Ridge Regression, LASSO, and Elastic Nets
 
Naive bayes
Naive bayesNaive bayes
Naive bayes
 
Different kind of distance and Statistical Distance
Different kind of distance and Statistical DistanceDifferent kind of distance and Statistical Distance
Different kind of distance and Statistical Distance
 
Matching methods
Matching methodsMatching methods
Matching methods
 
Principal component analysis and lda
Principal component analysis and ldaPrincipal component analysis and lda
Principal component analysis and lda
 
Non Linear Equation
Non Linear EquationNon Linear Equation
Non Linear Equation
 
Introduction to principal component analysis (pca)
Introduction to principal component analysis (pca)Introduction to principal component analysis (pca)
Introduction to principal component analysis (pca)
 
Random forest
Random forestRandom forest
Random forest
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Logistic regression with SPSS
Logistic regression with SPSSLogistic regression with SPSS
Logistic regression with SPSS
 

Similar to Roc auc curve

Introduction to ROC Curve Analysis with Application in Functional Genomics
Introduction to ROC Curve Analysis with Application in Functional GenomicsIntroduction to ROC Curve Analysis with Application in Functional Genomics
Introduction to ROC Curve Analysis with Application in Functional GenomicsShana White
 
Data mining assignment 5
Data mining assignment 5Data mining assignment 5
Data mining assignment 5BarryK88
 
Matlab lab manual
Matlab lab manualMatlab lab manual
Matlab lab manualnmahi96
 
Markov Models in Homeopathic Treatment on Pet Animals
Markov Models in Homeopathic Treatment on Pet AnimalsMarkov Models in Homeopathic Treatment on Pet Animals
Markov Models in Homeopathic Treatment on Pet Animalstheijes
 
Deep learning simplified
Deep learning simplifiedDeep learning simplified
Deep learning simplifiedLovelyn Rose
 
CALIFORNIA STATE UNIVERSITY, NORTHRIDGEMECHANICAL ENGINEERIN.docx
CALIFORNIA STATE UNIVERSITY, NORTHRIDGEMECHANICAL ENGINEERIN.docxCALIFORNIA STATE UNIVERSITY, NORTHRIDGEMECHANICAL ENGINEERIN.docx
CALIFORNIA STATE UNIVERSITY, NORTHRIDGEMECHANICAL ENGINEERIN.docxRAHUL126667
 
Ch 4 Slides.doc655444444444444445678888776
Ch 4 Slides.doc655444444444444445678888776Ch 4 Slides.doc655444444444444445678888776
Ch 4 Slides.doc655444444444444445678888776ohenebabismark508
 
numericai matmatic matlab uygulamalar ali abdullah
numericai matmatic  matlab  uygulamalar ali abdullahnumericai matmatic  matlab  uygulamalar ali abdullah
numericai matmatic matlab uygulamalar ali abdullahAli Abdullah
 
ch09d.ppt
ch09d.pptch09d.ppt
ch09d.pptbutest
 
CrashCourse_0622
CrashCourse_0622CrashCourse_0622
CrashCourse_0622Dexen Xi
 
lagrange and newton divided differences.ppt
lagrange and newton divided differences.pptlagrange and newton divided differences.ppt
lagrange and newton divided differences.pptThirumoorthy64
 
Correspondence Analysis
Correspondence AnalysisCorrespondence Analysis
Correspondence AnalysisGaetan Lion
 
Berlin Epi Methods Colluquium may 2021
Berlin Epi Methods Colluquium may 2021Berlin Epi Methods Colluquium may 2021
Berlin Epi Methods Colluquium may 2021Ellie Murray
 
Dalut ppt. of factorial analysis of variance-b
Dalut ppt. of factorial analysis of variance-bDalut ppt. of factorial analysis of variance-b
Dalut ppt. of factorial analysis of variance-bIan Kris Lastimosa
 

Similar to Roc auc curve (20)

Quality Python Homework Help
Quality Python Homework HelpQuality Python Homework Help
Quality Python Homework Help
 
Introduction to ROC Curve Analysis with Application in Functional Genomics
Introduction to ROC Curve Analysis with Application in Functional GenomicsIntroduction to ROC Curve Analysis with Application in Functional Genomics
Introduction to ROC Curve Analysis with Application in Functional Genomics
 
Data mining assignment 5
Data mining assignment 5Data mining assignment 5
Data mining assignment 5
 
Matlab lab manual
Matlab lab manualMatlab lab manual
Matlab lab manual
 
Binomial dist
Binomial distBinomial dist
Binomial dist
 
Project2
Project2Project2
Project2
 
Markov Models in Homeopathic Treatment on Pet Animals
Markov Models in Homeopathic Treatment on Pet AnimalsMarkov Models in Homeopathic Treatment on Pet Animals
Markov Models in Homeopathic Treatment on Pet Animals
 
Deep learning simplified
Deep learning simplifiedDeep learning simplified
Deep learning simplified
 
CALIFORNIA STATE UNIVERSITY, NORTHRIDGEMECHANICAL ENGINEERIN.docx
CALIFORNIA STATE UNIVERSITY, NORTHRIDGEMECHANICAL ENGINEERIN.docxCALIFORNIA STATE UNIVERSITY, NORTHRIDGEMECHANICAL ENGINEERIN.docx
CALIFORNIA STATE UNIVERSITY, NORTHRIDGEMECHANICAL ENGINEERIN.docx
 
Ch 4 Slides.doc655444444444444445678888776
Ch 4 Slides.doc655444444444444445678888776Ch 4 Slides.doc655444444444444445678888776
Ch 4 Slides.doc655444444444444445678888776
 
numericai matmatic matlab uygulamalar ali abdullah
numericai matmatic  matlab  uygulamalar ali abdullahnumericai matmatic  matlab  uygulamalar ali abdullah
numericai matmatic matlab uygulamalar ali abdullah
 
ch09d.ppt
ch09d.pptch09d.ppt
ch09d.ppt
 
CrashCourse_0622
CrashCourse_0622CrashCourse_0622
CrashCourse_0622
 
Maths digital text
Maths digital textMaths digital text
Maths digital text
 
Data Mind Traps
Data Mind TrapsData Mind Traps
Data Mind Traps
 
NN-Ch2.PDF
NN-Ch2.PDFNN-Ch2.PDF
NN-Ch2.PDF
 
lagrange and newton divided differences.ppt
lagrange and newton divided differences.pptlagrange and newton divided differences.ppt
lagrange and newton divided differences.ppt
 
Correspondence Analysis
Correspondence AnalysisCorrespondence Analysis
Correspondence Analysis
 
Berlin Epi Methods Colluquium may 2021
Berlin Epi Methods Colluquium may 2021Berlin Epi Methods Colluquium may 2021
Berlin Epi Methods Colluquium may 2021
 
Dalut ppt. of factorial analysis of variance-b
Dalut ppt. of factorial analysis of variance-bDalut ppt. of factorial analysis of variance-b
Dalut ppt. of factorial analysis of variance-b
 

Recently uploaded

Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Data Warehouse , Data Cube Computation
Data Warehouse   , Data Cube ComputationData Warehouse   , Data Cube Computation
Data Warehouse , Data Cube Computationsit20ad004
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts ServiceSapana Sha
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
Spark3's new memory model/management
Spark3's new memory model/managementSpark3's new memory model/management
Spark3's new memory model/managementakshesh doshi
 

Recently uploaded (20)

Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
Data Warehouse , Data Cube Computation
Data Warehouse   , Data Cube ComputationData Warehouse   , Data Cube Computation
Data Warehouse , Data Cube Computation
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...
Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...
Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts Service
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
Spark3's new memory model/management
Spark3's new memory model/managementSpark3's new memory model/management
Spark3's new memory model/management
 

Roc auc curve

  • 1. ROC- AUC Curve 21-11-2021 1 Department of Computer Science and Engineering National Institute of Technology Silchar, Assam, INDIA By- Nurul Amin Choudhury NIT Silchar - PhD Scholar
  • 2. 21-11-2021 2 ROC – AUC Curve • Main idea: Receiver Operating Curve (ROC) shows the performance of the classification model at different threshold settings. • ROC is a probability curve and AUC represents the degree or measure of separability. • It tells how much the model is capable of distinguishing between classes. • Higher the AUC, the better the model is at predicting 0 classes as 0 and 1 classes as 1. • It is consider that Higher the AUC, the better the model is at distinguishing between patients with the disease and no disease. • The ROC curve is plotted with True Positive Rate (TPR) against the False Positive Rate (FPR) where TPR is on the y-axis and FPR is on the x-axis.
  • 3. 21-11-2021 3 Cntd… Fig. 1. ROC-AUC Curve. Image courtesy: My Photoshopped Collection TPR = 𝑻𝒑 𝑻𝑷 +𝑭𝒏 • The TPR and FPR is given by- FPR = 𝑭𝒑 𝑻𝒏 +𝑭𝒑 • It is considered that more the AUC, better the model in classifying positive class as positive and negative as negative. AUC
  • 4. 21-11-2021 4 Example Problem- • Suppose, a classification model yields the classification probability as shown in Table 1. Step 1 - Let us set the different Threshold as 𝜶 = [0 , 0.2, 0.4, 0.8, 1] Step 2 - Taking first threshold as 𝜶 = [0], we will get- Step 3 - TPR = 4 4+0 = 1 & FPR = 2 2+0 = 1 Therefore TPR, FPR at 𝜶 = [0] is (1,1) Output Class. Prob. (Y) 1 0.8 0 0.96 1 0.4 1 0.3 0 0.2 1 0.7 Table 1. Actual Output vs Classification yielded Prob. Output Class. Prob. (Y) At 𝜶 = [0] Y1 1 0.8 1 0 0.96 1 1 0.4 1 1 0.3 1 0 0.2 1 1 0.7 1 Table 2. Predicted Output at 𝜶 = [0]
  • 5. 21-11-2021 5 Cntd… Output Class. Prob. (Y) At 𝜶 = [0.2] Y1 1 0.8 1 0 0.96 1 1 0.4 1 1 0.3 1 0 0.2 0 1 0.7 1 Step 4 - Repeating all the steps from Step 1 to Step 3 at 𝜶 = [0.2], we will get- TPR = 4 4+0 = 1 & FPR = 1 1+1 = 0.5 Therefore TPR, FPR at 𝜶 = [0.2] is (1 , 0.5) Output Class. Prob. (Y) At 𝜶 = [0.4] Y1 1 0.8 1 0 0.96 1 1 0.4 0 1 0.3 0 0 0.2 0 1 0.7 1 Step 5 - Again repeating all the steps from Step 1 to Step 3 at 𝜶 = [0.4], we will get- TPR = 2 2+2 = 0.5 & FPR = 1 1+1 = 0.5 Therefore TPR, FPR at 𝜶 = [0.4] is (0.5 , 0.5) Table 3. Predicted Output at 𝜶 = [0.2] Table 4. Predicted Output at 𝜶 = [0.4]
  • 6. 21-11-2021 6 Cntd… Output Class. Prob. (Y) At 𝜶 = [0.8] Y1 1 0.8 0 0 0.96 1 1 0.4 0 1 0.3 0 0 0.2 0 1 0.7 0 Step 6 - Repeating all the steps from Step 1 to Step 3 at 𝜶 = [0.8], we will get- TPR = 0 0+4 =0 & FPR = 1 1+1 = 0.5 Therefore TPR, FPR at 𝜶 = [0.8] is (0 , 0.5) Output Class. Prob. (Y) At 𝜶 = [1] Y1 1 0.8 0 0 0.96 0 1 0.4 0 1 0.3 0 0 0.2 0 1 0.7 0 Step 7 - Again repeating all the steps from Step 1 to Step 3 at 𝜶 = [1], we will get- TPR = 0 0+4 = 0 & FPR = 0 0+2 = 0 Therefore TPR, FPR at 𝜶 = [1] is (0 , 0) Table 5. Predicted Output at 𝜶 = [0.8] Table 6. Predicted Output at 𝜶 = [1]
  • 7. Cntd… Threshold TPR FPR 0 1 1 0.2 1 0.5 0.4 0.5 0.5 0.8 0 0.5 1 0 0 ROC Curve Step 8 – Finally, plotting the ROC curve at different threshold setting we will get- Table 7. TPR, FPR values at different threshold settings. Fig. 2. ROC-AUC Curve. AUC