Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def forest_test(X, Y):
- X_Train, X_Test, Y_Train, Y_Test = train_test_split(X, Y,
- test_size = 0.30,
- random_state = 101)
- start = time.process_time()
- trainedforest = RandomForestClassifier(n_estimators=700).fit(X_Train,Y_Train)
- print(time.process_time() - start)
- predictionforest = trainedforest.predict(X_Test)
- print(confusion_matrix(Y_Test,predictionforest))
- print(classification_report(Y_Test,predictionforest))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement