Advertisement
Sa1nt_Veronika

Untitled

Nov 19th, 2019
1,038
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. for depth in range(1, 6):
  2. model = DecisionTreeClassifier(random_state=12345, max_depth=depth)
  3. model.fit(features_train, target_train)
  4. predictions_valid = model.predict(features_valid)
  5. print("max_depth =", depth, ": ", end='')
  6. print(accuracy_score(target_valid, predictions_valid))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement