Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Training on full dataset
- model = DecisionTreeClassifier()
- model.fit(X,y)
- # Create dataset for ambigious characters to test with.
- data2 = data[data.Class == 2]
- X2 = data.iloc[:,0:-1]
- y2 = data.iloc[:,-1]
- # Predict probability for being villain??
- predictions = model.predict_proba(X=X2)
- print(predictions)
- """fig, ax = plt.subplots()
- plt.bar(k, predictions, align="center")
- #plt.bar([x - 0.2 for x in k], test_acc, width=0.2, align="center") axes = plt.gca()
- axes.set_ylim([min(predictions)-0.1,max(predictions)+0.1])
- plt.show()"""
- """
- predictions = model.predict_proba(X2)
- print(classification_report(y_true=y2, y_pred=predictions))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement