3

I'm using Python (NumPy) and I want to plot a ROC curve given a 1D noise histogram and another 1D histogram for the signal+noise distribution. I am aware that various libraries like scikit-learn can generate ROC curves, but they use a supervised machine learning approach based on the predicted vs. actual labels. Instead what I have is 2 numpy arrays: 1 for the discrete probability density function (histogram) of the background noise distribution, and another histogram for the signal+noise distribution. I'm not doing any machine learning, instead I just want to make a ROC curve from the 2 histograms. Can scikit-learn or another python library do this?

Thanks

dektorpan
  • 51
  • 3
  • There are several scientific libraries that can do this, the thing is: try. Then come back when you have some code written. Also, a hint as you are fairly new to Stackoverflow: using a relatively unknown acronym like "ROC" in a title decreases the chance of your post ever being seen. You should've added a link for those who are interested in the body of your message. – Oliver W. Dec 06 '14 at 17:00
  • Oliver, thanks for your advice. Here is the link to the ROC curve wikipedia article: https://en.wikipedia.org/wiki/Receiver_operating_characteristic. As far as your other suggestion, I have tried, and in fact I already have working code. But my question is not if my code works, it is if there are existing libraries that will easily plot a ROC curve given 2 histograms so that in the future I can just easily call that function, which I'm sure is better written than my own code. And if you know of some of those libraries, please tell me the name. Thanks for your advice. – dektorpan Dec 07 '14 at 03:50
  • @dektorpan, I wish the same. Could you provide us with your code? Or some library you have found? – Sigur Jun 02 '17 at 19:02
  • @dektorpan any code you could share please ? – valentin Feb 13 '18 at 15:42

0 Answers0