class_docstr: Base class for a Dynamic Ensemble Selection (DES).
  
  All dynamic ensemble selection techniques should inherit from this class.
  
  Warning: This class should not be instantiated directly, use
  derived classes instead.
docstr: Predicts the label of the corresponding query sample.
  
  If self.mode == "selection", the selected ensemble is combined using
  the majority voting rule
  
  If self.mode == "weighting", all base classifiers are used for
  classification, however their influence in the final decision are
  weighted according to their estimated competence level. The weighted
  majority voting scheme is used to combine the decisions of the
  base classifiers.
  
  If self.mode == "hybrid",  A hybrid Dynamic selection and weighting
  approach is used. First an ensemble with the competent base classifiers
  are selected. Then, their decisions are aggregated using the weighted
  majority voting rule according to its competence level estimates.
  
  Parameters
  ----------
  predictions : array of shape (n_samples, n_classifiers)
                Predictions of the base classifier for all test examples.
  
  probabilities : array of shape (n_samples, n_classifiers, n_classes)
      Probabilities estimates of each base classifier for all test
      examples. (For methods that always require probabilities from
      the base classifiers).
  
  competence_region : array of shape (n_samples, n_neighbors)
      Indices of the k nearest neighbors according for each test sample.
  
  distances : array of shape (n_samples, n_neighbors)
                  Distances from the k nearest neighbors to the query
  
  DFP_mask : array of shape (n_samples, n_classifiers)
      Mask containing 1 for the selected base classifier and 0 otherwise.
  
  Returns
  -------
  predicted_label : array of shape (n_samples)
                    Predicted class label for each test example.
docstr_tok: ["Predicts","the","label","of","the","corresponding","query","sample",".","If","self.mode","==","``","selection","''",",","the","selected","ensemble","is","combined","using","the","majority","voting","rule","If","self.mode","==","``","weighting","''",",","all","base","classifiers","are","used","for","classification",",","however","their","influence","in","the","final","decision","are","weighted","according","to","their","estimated","competence","level",".","The","weighted","majority","voting","scheme","is","used","to","combine","the","decisions","of","the","base","classifiers",".","If","self.mode","==","``","hybrid","''",",","A","hybrid","Dynamic","selection","and","weighting","approach","is","used",".","First","an","ensemble","with","the","competent","base","classifiers","are","selected",".","Then",",","their","decisions","are","aggregated","using","the","weighted","majority","voting","rule","according","to","its","competence","level","estimates",".","Parameters","--","--","--","--","--","predictions",":","array","of","shape","(","n_samples",",","n_classifiers",")","Predictions","of","the","base","classifier","for","all","test","examples",".","probabilities",":","array","of","shape","(","n_samples",",","n_classifiers",",","n_classes",")","Probabilities","estimates","of","each","base","classifier","for","all","test","examples",".","(","For","methods","that","always","require","probabilities","from","the","base","classifiers",")",".","competence_region",":","array","of","shape","(","n_samples",",","n_neighbors",")","Indices","of","the","k","nearest","neighbors","according","for","each","test","sample",".","distances",":","array","of","shape","(","n_samples",",","n_neighbors",")","Distances","from","the","k","nearest","neighbors","to","the","query","DFP_mask",":","array","of","shape","(","n_samples",",","n_classifiers",")","Mask","containing","1","for","the","selected","base","classifier","and","0","otherwise",".","Returns","--","--","--","-","predicted_label",":","array","of","shape","(","n_samples",")","Predicted","class","label","for","each","test","example","."]
code: def classify_with_ds(
      self,
      predictions,
      probabilities=None,
      competence_region=None,
      distances=None,
      DFP_mask=None,
  ):
      """Predicts the label of the corresponding query sample.
  
      If self.mode == "selection", the selected ensemble is combined using
      the majority voting rule
  
      If self.mode == "weighting", all base classifiers are used for
      classification, however their influence in the final decision are
      weighted according to their estimated competence level. The weighted
      majority voting scheme is used to combine the decisions of the
      base classifiers.
  
      If self.mode == "hybrid",  A hybrid Dynamic selection and weighting
      approach is used. First an ensemble with the competent base classifiers
      are selected. Then, their decisions are aggregated using the weighted
      majority voting rule according to its competence level estimates.
  
      Parameters
      ----------
      predictions : array of shape (n_samples, n_classifiers)
                    Predictions of the base classifier for all test examples.
  
      probabilities : array of shape (n_samples, n_classifiers, n_classes)
          Probabilities estimates of each base classifier for all test
          examples. (For methods that always require probabilities from
          the base classifiers).
  
      competence_region : array of shape (n_samples, n_neighbors)
          Indices of the k nearest neighbors according for each test sample.
  
      distances : array of shape (n_samples, n_neighbors)
                      Distances from the k nearest neighbors to the query
  
      DFP_mask : array of shape (n_samples, n_classifiers)
          Mask containing 1 for the selected base classifier and 0 otherwise.
  
      Returns
      -------
      predicted_label : array of shape (n_samples)
                        Predicted class label for each test example.
      """
      probas = self.predict_proba_with_ds(
          predictions,
          probabilities,
          competence_region,
          distances,
          DFP_mask,
      )
      return probas.argmax(axis=1)
  
file_path: DESlib/deslib/des/base.py
imports: from abc import ABCMeta
  import numpy
  from deslib.base import BaseDS
  from deslib.util.aggregation import aggregate_proba_ensemble_weighted, sum_votes_per_class, get_weighted_votes
label_desc: Use image node_id 2 for calling the BaseDES obj's underlying member method code with example usage: obj.classify_with_ds(predictions, probabilities, competence_region, distances, DFP_mask) and returns: probas