def fit(self, X, y):
        self.best_params = None
        if self.mean != 'simple':
            if self.verbose:
                widgets = ['Training : ', Percentage(), ' ', Bar(marker=RotatingMarker()),
                   ' ', ETA(), ' ']
                self.pbar = ProgressBar(widgets=widgets, maxval=(self.max_evals * len(self.param_space)))
                self.pbar.start()
            
            objective = lambda w: -np.mean([roc_auc_score(y[:, col],
                                            self.calcMean(X[:, col::6], w, training=True))
                                            for col in range(6)])
                                            
            self.best_params = fmin(objective, self.param_space, algo=tpe.suggest,
                                    max_evals=self.max_evals)
            
            if self.verbose:
                print(self.best_params)
        else:
            self.best_params = None
Fit.
dataset/ETHPy150Open alexandrebarachant/Grasp-and-lift-EEG-challenge/ensembling/WeightedMean.py/WeightedMeanClassifier.fit