def _create_cv_ensemble(self, base_ensemble, idx_models_included, model_names=None):
        """For each selected base estimator, average models trained on each fold"""
        fitted_models = numpy.empty(len(idx_models_included), dtype=numpy.object)
        for i, idx in enumerate(idx_models_included):
            model_name = self.base_estimators[idx][0] if model_names is None else model_names[idx]
            avg_model = EnsembleAverage(base_ensemble[idx, :], name=model_name)
            fitted_models[i] = avg_model

        return fitted_models
def _create_cv_ensemble ( self , base_ensemble , idx_models_included , model_names = None ) : fitted_models = numpy . empty ( len ( idx_models_included ) , dtype = numpy . object ) for i , idx in enumerate ( idx_models_included ) : model_name = self . base_estimators [ idx ] [ 0 ] if model_names is None else model_names [ idx ] avg_model = EnsembleAverage ( base_ensemble [ idx , : ] , name = model_name ) fitted_models [ i ] = avg_model return fitted_models
For each selected base estimator, average models trained on each fold