Skip to content

Instantly share code, notes, and snippets.

@purva91
Created Sep 11, 2019
Embed
What would you like to do?
precision, recall, thresholds = precision_recall_curve(y_test, y_pred_proba)
plt.figure(figsize=(10,8))
plt.plot([0, 1], [0.5, 0.5],'k--')
plt.plot(recall, precision, label='Knn')
plt.xlabel('recall')
plt.ylabel('precision')
plt.title('Knn(n_neighbors=5) PRC curve')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment