title: Different result with roc_auc_score() and auc()
body: <p>I have trouble understanding the difference (if there is one) between <code>roc_auc_score()</code> and <code>auc()</code> in scikit-learn.</p>
  
  <p>Im tying to predict a binary output with imbalanced classes (around 1.5% for Y=1).</p>
  
  <h3>Classifier</h3>
  
  <pre><code>model_logit = LogisticRegression(class_weight='auto')
  model_logit.fit(X_train_ridge, Y_train)
  </code></pre>
  
  <h3>Roc curve</h3>
  
  <pre><code>false_positive_rate, true_positive_rate, thresholds = roc_curve(Y_test, clf.predict_proba(xtest)[:,1])
  </code></pre>
  
  <h3>AUC's</h3>
  
  <pre><code>auc(false_positive_rate, true_positive_rate)
  Out[490]: 0.82338034042531527
  </code></pre>
  
  <p>and</p>
  
  <pre><code>roc_auc_score(Y_test, clf.predict(xtest))
  Out[493]: 0.75944737191205602
  </code></pre>
  
  <p>Somebody can explain this difference ? I thought both were just calculating the area under the ROC curve. Might be because of the imbalanced dataset but I could not figure out why.</p>
  
  <p>Thanks!</p>