SHARE
TWEET

Untitled

a guest Oct 18th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Listing 4
  2. np.random.seed(2)
  3. x1=np.arange(1,10001)
  4. y1=np.zeros(10000)
  5. y1[5000:10000]=1
  6.  
  7. prob = predict_proba(x1)
  8. fpr, tpr, threshold = roc_curve(y1, prob)
  9.  
  10. plt.plot(fpr, tpr, 'b')
  11. plt.plot([0,1],[0,1], 'r--')
  12. plt.xlabel("False Positive Rate", fontsize=12)
  13. plt.ylabel("True Positive Rate", fontsize=12)
  14.  
  15. plt.savefig('random_classifier_roc_inc.png', dpi=300)
  16. plt.show()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top