title: Classification accuracy after recall and precision
body: <p>I'm just wondering if this is a legitimate way of calculating classification accuracy:</p>
  
  <ol>
  <li>obtain precision recall thresholds</li>
  <li>for each threshold binarize the continuous y_scores</li>
  <li>calculate their accuracy from the contingency table (confusion matrix)</li>
  <li><p>return the average accuracy for the thresholds</p>
  
  <pre><code>recall, precision, thresholds = precision_recall_curve(np.array(np_y_true), np.array(np_y_scores))
  accuracy = 0
  for threshold in thresholds:
      contingency_table = confusion_matrix(np_y_true, binarize(np_y_scores, threshold=threshold)[0])
      accuracy += (float(contingency_table[0][0]) + float(contingency_table[1][1]))/float(np.sum(contingency_table))
  
  print "Classification accuracy is: {}".format(accuracy/len(thresholds))
  </code></pre></li>
  </ol>