Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. def forest_test(X, Y):
  2. X_Train, X_Test, Y_Train, Y_Test = train_test_split(X, Y,
  3. test_size = 0.30,
  4. random_state = 101)
  5. start = time.process_time()
  6. trainedforest = RandomForestClassifier(n_estimators=700).fit(X_Train,Y_Train)
  7. print(time.process_time() - start)
  8. predictionforest = trainedforest.predict(X_Test)
  9. print(confusion_matrix(Y_Test,predictionforest))
  10. print(classification_report(Y_Test,predictionforest))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement