code: def decision_function(self, X, aggregation = 'raw'):
          
          if aggregation == 'weighted':
              if 'predict_proba' not in dir(self.classifiers[0]):
                  raise Exception("'aggregation='weighted'' is only available for classifiers with 'predict_proba' method.")
  
          preds = np.empty((X.shape[0], self.n_samples), dtype = "float64")
          if aggregation == "raw":
              Parallel(n_jobs=self.njobs, verbose=0, require="sharedmem")(delayed(self._decision_function_raw)(c, preds, X) for c in range(self.nsamples))
          elif aggregation == "weighted":
              Parallel(n_jobs=self.njobs, verbose=0, require="sharedmem")(delayed(self._decision_function_weighted)(c, preds, X) for c in range(self.nsamples))
          else:
              raise ValueError("'aggregation' must be one of 'raw' or 'weighted'.")
          return preds.mean(axis = 1).reshape(-1)
docs: Calculate how preferred is positive class according to classifiers
          
          Note
          ----
          If passing aggregation = 'raw', it will output the proportion of the classifiers
          that voted for the positive class.
          If passing aggregation = 'weighted', it will output the average predicted probability
          for the positive class for each classifier.
          
          Calculating it with aggregation = 'weighted' requires the base classifier to have a
          'predict_proba' method.
          
          Parameters
          ----------
          X : array (n_samples, n_features):
              Observations for which to determine class likelihood.
          aggregation : str, either 'raw' or 'weighted'
              How to compute the 'goodness' of the positive class (see Note)
              
          Returns
          -------
          pred : array (n_samples,)
              Score for the positive class (see Note)