title: How to use prediction score in creating ROC curve with Scikit-Learn
body: <p>I have the following code:</p>
  
  <pre><code>from sklearn.metrics import roc_curve, auc
  
  actual      = [1,1,1,0,0,1]
  prediction_scores = [0.9,0.9,0.9,0.1,0.1,0.1]
  false_positive_rate, true_positive_rate, thresholds = roc_curve(actual, prediction_scores, pos_label=1)
  roc_auc = auc(false_positive_rate, true_positive_rate)
  roc_auc
  # 0.875
  </code></pre>
  
  <p>In this example the interpretation of <code>prediction_scores</code> is straightforward namely, the <strong>higher</strong> the score the more confident the prediction is. </p>
  
  <p>Now I have another set of prediction prediction scores.
  It is non-fractional, and the interpretation is the reverse. Meaning the <strong>lower</strong>
  the score more confident the prediction is.  </p>
  
  <pre><code>prediction_scores_v2 = [10.3,10.3,10.2,10.5,2000.34,2000.34]
  # so this is equivalent 
  </code></pre>
  
  <p>My question is: <em>how can I scale that in <code>prediction_scores_v2</code> so that it gives
  similar AUC score like the first one?</em></p>
  
  <p>To put it another way, <a href="http://scikit-learn.org/stable/modules/generated/sklearn.metrics.roc_curve.html" rel="nofollow noreferrer">Scikit's ROC_CURVE</a> requires the <code>y_score</code> to be <em>probability estimates of the positive class</em>.  How can I treat the value if the <code>y_score</code> I have is  <em>probability estimates of the wrong class</em>?</p>