diff --git a/sklearn/ensemble/base.py b/sklearn/ensemble/base.py index 0f1d7087ed501..8477519be3ec8 100644 --- a/sklearn/ensemble/base.py +++ b/sklearn/ensemble/base.py @@ -5,6 +5,7 @@ # Authors: Gilles Louppe # License: BSD 3 clause +import copy import numpy as np import numbers @@ -124,7 +125,7 @@ def _make_estimator(self, append=True, random_state=None): sub-estimators. """ estimator = clone(self.base_estimator_) - estimator.set_params(**dict((p, getattr(self, p)) + estimator.set_params(**dict((p, copy.deepcopy(getattr(self, p))) for p in self.estimator_params)) if random_state is not None: