class_docstr: Base class for a Dynamic Classifier Selection (dcs) method.
  All dynamic classifier selection classes should inherit from this class.
  
  Warning: This class should not be used directly, use derived classes
  instead.
docstr: Predicts the class label of the corresponding query sample.
  
  If self.selection_method == "all", the majority voting scheme is used
  to aggregate the predictions of all classifiers with the max competence
  level estimates for each test examples.
  
  Parameters
  ----------
  predictions : array of shape (n_samples, n_classifiers)
      Predictions of the base classifiers 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)
  
  neighbors : array of shape (n_samples, n_neighbors)
      Indices of the k nearest neighbors.
  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)
      The predicted label for each query
docstr_tok: ["Predicts","the","class","label","of","the","corresponding","query","sample",".","If","self.selection_method","==","``","all","''",",","the","majority","voting","scheme","is","used","to","aggregate","the","predictions","of","all","classifiers","with","the","max","competence","level","estimates","for","each","test","examples",".","Parameters","--","--","--","--","--","predictions",":","array","of","shape","(","n_samples",",","n_classifiers",")","Predictions","of","the","base","classifiers","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",")","neighbors",":","array","of","shape","(","n_samples",",","n_neighbors",")","Indices","of","the","k","nearest","neighbors",".","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",")","The","predicted","label","for","each","query"]
code: def classify_with_ds(
      self,
      predictions,
      probabilities=None,
      neighbors=None,
      distances=None,
      DFP_mask=None,
  ):
      """Predicts the class label of the corresponding query sample.
  
      If self.selection_method == "all", the majority voting scheme is used
      to aggregate the predictions of all classifiers with the max competence
      level estimates for each test examples.
  
      Parameters
      ----------
      predictions : array of shape (n_samples, n_classifiers)
          Predictions of the base classifiers 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)
  
      neighbors : array of shape (n_samples, n_neighbors)
          Indices of the k nearest neighbors.
      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)
          The predicted label for each query
      """
      if predictions.ndim < 2:
          predictions = predictions.reshape(1, -1)
      competences = self.estimate_competence(
          neighbors, distances=distances, predictions=predictions
      )
  
      if self.DFP:
          competences = competences * DFP_mask
  
      if self.selection_method != "all":
          # only one classifier is selected
          clf_index = self.select(competences)
          predicted_label = predictions[
              np.arange(predictions.shape[0]), clf_index
          ]
      else:
          # Selected ensemble of classifiers is combined using Majority
          # Voting
          indices = self.select(competences)
          votes = np.ma.MaskedArray(predictions, ~indices)
          predicted_label = majority_voting_rule(votes)
  
      return predicted_label
  
file_path: DESlib/deslib/dcs/base.py
imports: from abc import ABCMeta
  from copy import copy
  import numpy
  from sklearn.utils.validation import check_random_state
  from deslib.base import BaseDS
  from deslib.util.aggregation import majority_voting_rule
label_desc: Use image node_id 4 for calling the BaseDCS obj's underlying member method code with example usage: obj.classify_with_ds(predictions, probabilities, neighbors, distances, DFP_mask) and returns: predicted_label