def combine(all_ensembles):
    """Combine the sub-estimators of a group of ensembles
        >>> from sklearn.datasets import load_iris
        >>> from sklearn.ensemble import ExtraTreesClassifier
        >>> iris = load_iris()
        >>> X, y = iris.data, iris.target
        >>> all_ensembles = [ExtraTreesClassifier(n_estimators=4).fit(X, y)
        ...                  for i in range(3)]
        >>> big = combine(all_ensembles)
        >>> len(big.estimators_)
        12
        >>> big.n_estimators
        12
        >>> big.score(X, y)
        1.0
    """
final_ensemble = copy(all_ensembles[0])
final_ensemble.estimators_ = []
for ensemble in all_ensembles:
    final_ensemble.estimators_ += ensemble.estimators_
final_ensemble.n_estimators = len(final_ensemble.estimators_)
return final_ensemble
параллельная генерация случайных лесов с помощью scikit-learn