How to plot an ROC curve for binary-valued scores using scikit-learn?
<p>I plotted an <a href="https://en.wikipedia.org/wiki/Receiver_operating_characteristic" rel="nofollow noreferrer">ROC curve</a> using the code shown below:</p>

<pre><code>fpr["micro"], tpr["micro"], _ = roc_curve(y_test.ravel(), y_score.ravel())

plt.plot(fpr["micro"], tpr["micro"],
         label='ROC curve Fold1 (area = %0.2f)' % roc_auc1["micro"])
</code></pre>

<p>I want a plot that looks like a <em>curve</em>, but what I'm achieving now, as seen in the figure below, consists of two straight lines:</p>

<p><a href="https://i.stack.imgur.com/fFpLB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fFpLB.png" alt="enter image description here"></a></p>