def combine(all_ensembles):
    final_ensemble = copy(all_ensembles[0])
    final_ensemble.estimators_ = []

    for ensemble in all_ensembles:
        final_ensemble.estimators_ += ensemble.estimators_

    # Required in old versions of sklearn
    final_ensemble.n_estimators = len(final_ensemble.estimators_)

    return final_ensemble
Combine the sub-estimators of a group of ensembles
dataset/ETHPy150Open pydata/pyrallel/pyrallel/ensemble.py/combine