Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Listing 4
- np.random.seed(2)
- x1=np.arange(1,10001)
- y1=np.zeros(10000)
- y1[5000:10000]=1
- prob = predict_proba(x1)
- fpr, tpr, threshold = roc_curve(y1, prob)
- plt.plot(fpr, tpr, 'b')
- plt.plot([0,1],[0,1], 'r--')
- plt.xlabel("False Positive Rate", fontsize=12)
- plt.ylabel("True Positive Rate", fontsize=12)
- plt.savefig('random_classifier_roc_inc.png', dpi=300)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement