title: How to plot the Error and the Tree size of a Random Forest
body: <p>I created a RandomForestRegressor with 100 Trees and now I want to check, if the RandomForest is overfitted. Therefore I want to plot the Error on the y-axis and the Tree size (1,...100, x-axis). But I could not find the answer how I get the prediction of each Tree. Now I have just the error for each datapoint. I searched for days now and I hope somebody could help me to find the answer. Thank you very much!</p>
  
  <pre><code>forest_model = RandomForestRegressor
  (estimators=100,
  min_sample_split=2,
  min_sample_leaf_5,
  random_state=42)
  
  forest_model.fit(X_train_v1, y_train_v2)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/ftIQe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ftIQe.png" alt="enter image description here"></a></p>
  
  <p>I want something like this plot just for a RandomForestRegressor</p>