Does anyone know of a way to plot the MSE of the trees from the random forest regressor in sklearn?
In R this is incredibly easy:
> fit = randomForest(y ~ X)
> plot(fit)
but I haven't found of a way to do this in python.
Like this:
from sklearn.metrics import mean_squared_error
mean_squared_error(y, predictions)
or using numpy:
np.mean((y_test - est.predict(X_test))**2)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.