Created
September 11, 2019 10:43
-
-
Save purva91/278692f2706b092060667de348808219 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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