title: Why RandomForestClassifier doesn't have cost_complexity_pruning_path method?
body: <p>In trying to prevent my <a href="https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html" rel="nofollow noreferrer">Random Forest</a> model from overfitting on the training dataset, I looked at the <code>ccp_alpha</code> parameter.
  I do notice that it is possible to tune it with a hyperparameter search method (as <code>GridSearchCV</code>).</p>
  <p>I discovered that there is a <a href="https://scikit-learn.org/stable/auto_examples/tree/plot_cost_complexity_pruning.html" rel="nofollow noreferrer">Scikit-Learn tutorial</a> for tuning this <code>ccp_alpha</code> parameter for <a href="https://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeClassifier.html#" rel="nofollow noreferrer">Decision Tree</a> models.
  The methodology described uses the <code>cost_complexity_pruning_path</code> method of the Decision Tree model. <a href="https://scikit-learn.org/stable/modules/tree.html#minimal-cost-complexity-pruning" rel="nofollow noreferrer">This section</a> explains well how the method works. I understand that it seeks to find a sub-tree of the generated model that reduces overfitting, while using values of <code>ccp_alpha</code> determined by the <code>cost_complexity_pruning_path</code> method.</p>
  <pre><code>clf = DecisionTreeClassifier()
  path = clf.cost_complexity_pruning_path(X_train, y_train)
  ccp_alphas, impurities = path.ccp_alphas, path.impurities
  </code></pre>
  <p>However, I wonder why the Random Forest model type in Scikit-Learn does not implement these <code>ccp_alpha</code> selection and pruning concept.
  Would it be possible to do this with a little tinkering?
  It seems more logical to me than trying to find a good value by searching for hyperparameters (whatever one you use..)</p>