Answers for "python template for testing random forest model"

2

how to use random tree in python

from sklearn.ensemble import RandomForestRegressor

regressor = RandomForestRegressor(n_estimators=20, random_state=0)
regressor.fit(X_train, y_train)
y_pred = regressor.predict(X_test)
Posted by: Guest on May-23-2020

Code answers related to "python template for testing random forest model"

Python Answers by Framework

Browse Popular Code Answers by Language