Skip to content

Instantly share code, notes, and snippets.

@spedy
Created March 6, 2016 19:49
Show Gist options
  • Save spedy/827a57d10d04d83f3a87 to your computer and use it in GitHub Desktop.
Save spedy/827a57d10d04d83f3a87 to your computer and use it in GitHub Desktop.
import matplotlib.pyplot as pl
recall, precision, thresholds = precision_recall_curve(np.array(np_y_true), np.array(np_y_scores))
pl.plot(recall, precision)
pl.xlabel('Recall')
pl.ylabel('Precision')
pl.ylim([0.0, 1.05])
pl.xlim([0.0, 1.0])
pl.title('Precision-Recall')
pl.savefig("{0}_{1}.png".format(kernel, k))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment