Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Apr 17th, 2018 57 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. # Training on full dataset
  2. model = DecisionTreeClassifier()
  3. model.fit(X,y)
  4. # Create dataset for ambigious characters to test with.
  5. data2 = data[data.Class == 2]
  6. X2 = data.iloc[:,0:-1]
  7. y2 = data.iloc[:,-1]
  8.  
  9. # Predict probability for being villain??
  10. predictions = model.predict_proba(X=X2)
  11. print(predictions)
  12.  
  13. """fig, ax = plt.subplots()
  14. plt.bar(k, predictions, align="center")
  15. #plt.bar([x - 0.2 for x in k], test_acc, width=0.2, align="center") axes = plt.gca()
  16. axes.set_ylim([min(predictions)-0.1,max(predictions)+0.1])
  17. plt.show()"""
  18.  
  19.  
  20. """
  21. predictions = model.predict_proba(X2)
  22. print(classification_report(y_true=y2, y_pred=predictions))
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