daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Apr 17th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
Top