rf = RandomForestRegressor()
grid = GridSearchCV(rf,param_grid=param_grid,cv=3,n_jobs=8)
grid.fit(train_X,train_y)
我像上面的代码一样使用 RandomForestRegressor。而且,我想得到 train_error。我怎样才能做到这一点?
更具体地说:(1)我可以从 RandomForestRegressor 中得到“train_error”吗?(2)如果我使用“mean_squared_error”,我怎样才能得到训练数据的预测值。
我的问题的一些图片。