How to calculate auc or roc or auc-roc score from y_true
and y_pred
values for SINGLE CLASS in y_true
using python code.
I have checked various similar questions on stackoverflow and internet but the task is not solved or the output is not that is expected.
Here is example of y_true
and y_pred
values.
y_true = numpy.array([1,1,1])
y_pred = numpy.array([0.36,0.82,0.46])
Or,
y_true = [1,1,1]
y_pred = [0.36,0.82,0.46]
As a mention, I have checked with various built-in functions of python libraries and found that although the true-positive-rate can be found but the false-positive-rate is shown as nan or not a number.
tensorflow and/or theano and/or pytorch and/or caffe and/or sklearn and/or other python libraries or modified function of python can be used to find AUC or ROC or AUC-ROC score value from y_true of single class value 1's and y_pred predicted scores.
Please comment if you need more details.