Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #the model.predict_proba is turned into a dataframe to make it more accessible
- #train the model
- X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size = 0.2, random_state = 263)
- #test the model
- model = tree.DecisionTreeClassifier()
- model.fit(X_train, y_train)
- df2 = pd.DataFrame(model.predict_proba(X_test))
- model.score(X_test, y_test)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement