def __init__(self, ensemble, step=0.025, max_evals=100, mean='arithmetic', 
                 verbose=True):
        self.ensemble = ensemble
        self.step = step
        self.max_evals = max_evals
        self.mean = mean
        self.count = -1
        self.verbose = verbose
        
        self.param_space = OrderedDict()
        for model in ensemble:
            self.param_space[model] = hp.quniform(model, 0, 3, self.step)
            
        # input data are arranged in a particular order, whereas hyperopt uses 
        # unordered lists when optimizing. The model has to keep track 
        # of the initial order so that correct weights are applied to columns
        self.sorting = dict()
        for i, m in enumerate(self.ensemble):
            self.sorting[m] = i
Init.
dataset/ETHPy150Open alexandrebarachant/Grasp-and-lift-EEG-challenge/ensembling/WeightedMean.py/WeightedMeanClassifier.__init__