[scikit-learn] Roc curve from multilabel classification has slope
José Ismael Fernández Martínez
ismaelfm_ at ciencias.unam.mx
Sat Jan 7 15:52:10 EST 2017
Hi, I have a multilabel classifier written in Keras from which I want to compute AUC and plot a ROC curve for every element classified from my test set.
Everything seems fine, except that some elements have a roc curve that have a slope as follows:
I don't know how to interpret the slope in such cases.
Basically my workflow goes as follows, I have a pre-trained model, instance of Keras, and I have the features X and the binarized labels y, every element in y is an array of length 1000, as it is a multilabel classification problem each element in y might contain many 1s, indicating that the element belongs to multiples classes, so I used the built-in loss of binary_crossentropy and my outputs of the model prediction are score probailities. Then I plot the roc curve as follows.
The predict method returns probabilities, as I'm using the functional api of keras.
Does anyone knows why my roc curves looks like this?
Ismael
Sent from my iPhone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20170107/bd88aee0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image1.PNG
Type: image/png
Size: 132225 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20170107/bd88aee0/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image3.PNG
Type: image/png
Size: 42172 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20170107/bd88aee0/attachment-0003.png>
More information about the scikit-learn
mailing list