How to draw ROC curve from true positive rate and false positive rate
    6 views (last 30 days)
  
       Show older comments
    
I have calculated the True positive rate and false positive rate.But from this how to calculate the labels and scores in perfcurve()in matlab.
or else from True positive rate and false positive rate,how to draw the ROC curve
0 Comments
Answers (2)
  KALYAN ACHARJYA
      
      
 on 2 Jun 2017
        
      Edited: KALYAN ACHARJYA
      
      
 on 2 Jun 2017
  
      Dear,
Just calculate the sensitivity and specificity by using true positive, true negative, false positive and false negative values. The formula available in wiki just check it out.
TPR(True Positive Rate)=Sensitivity
FPR(False Negative Rate)=1-Specificity
https://en.wikipedia.org/wiki/Sensitivity_and_specificity
No to draw ROC curve use matlab line plot(1-specificity,sensitivity,'o-');
Thats the way..Still, you need help let me know here...
2 Comments
  Ahsan Saleem
 on 17 Mar 2018
				hi,
plot(1-specificity,sensitivity,'o-'); only draws a point how to draw ROC curve ?
Thank you.
  Thorsten
      
      
 on 11 Jul 2016
        plot(FPR, TPR)
1 Comment
  upasana verma
 on 22 Feb 2017
				plot(FPR,TPR) won't give exact curve. Not look like as ROC curve.its like a simple curve. Anyone please tell the another solution.I am also stuck over there.How to plot a ROC with TPR and FPR.
See Also
Categories
				Find more on Detection in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




