old_contents: from sklearn import metrics
  
  
  def auc(truth, prediction):
      """
      Compute the AUC for given predictions and ground truth
      
      Parameters:
      truth      - 1d numpy array of ground truth labels (binary)
      prediction - 1d numpy array of predicted probabilities
      
      @author: Heiko
      """
      # compute tp & fp rates, 1 is regarded as positive
      fpr, tpr, _ = metrics.roc_curve(truth, prediction, pos_label=1)
      
      # return integrated ROC curve
      return metrics.auc(fpr, tpr)
  
new_contents: from sklearn import metrics
  
  
  def auc(truth, prediction):
      """
      Compute the AUC for given predictions and ground truth
      
      Parameters:
      truth      - 1d numpy array of ground truth labels (binary)
      prediction - 1d numpy array of predicted probabilities
      
      @author: Heiko
      """
      
      # return integrated ROC curve
      return metrics.roc_auc_score(truth, prediction)
  
subject: use new sklearn 0.14 auc