class_docstr: Dynamic ensemble selection-Clustering (DES-Clustering).
  
  This method selects an ensemble of classifiers taking into account the
  accuracy and diversity of the base classifiers. The K-means algorithm is
  used to define the region of competence. For each cluster, the N most
  accurate classifiers are first selected. Then, the J more diverse
  classifiers from the N most accurate classifiers are selected to
  compose the ensemble.
  
  Parameters
  ----------
   pool_classifiers : list of classifiers (Default = None)
      The generated_pool of classifiers trained for the corresponding
      classification problem. Each base classifiers should support the method
      "predict". If None, then the pool of classifiers is a bagging
      classifier.
  
  clustering : sklearn.cluster (Default = None)
      The clustering model used to estimate the region of competence.
      If None, a KMeans with K = 5 is used.
  
  pct_accuracy : float (Default = 0.5)
                 Percentage of base classifiers selected based on accuracy
  
  pct_diversity : float (Default = 0.33)
                  Percentage of base classifiers selected based on diversity
  
  more_diverse : Boolean (Default = True)
                 Whether we select the most or the least diverse classifiers
                 to add to the pre-selected ensemble
  
  metric_diversity : String (Default = 'df')
      Metric used to estimate the diversity of the base classifiers. Can be
      either the double fault (df), Q-statistics (Q), or error correlation.
  
  metric_performance : String (Default = 'accuracy_score')
      Metric used to estimate the performance of a base classifier on a
      cluster. Can be either any metric from sklearn.metrics.
  
  random_state : int, RandomState instance or None, optional (default=None)
      If int, random_state is the seed used by the random number generator;
      If RandomState instance, random_state is the random number generator;
      If None, the random number generator is the RandomState instance used
      by `np.random`.
  
  DSEL_perc : float (Default = 0.5)
      Percentage of the input data used to fit DSEL.
      Note: This parameter is only used if the pool of classifier is None or
      unfitted.
  
  voting : {'hard', 'soft'}, default='hard'
          If 'hard', uses predicted class labels for majority rule voting.
          Else if 'soft', predicts the class label based on the argmax of
          the sums of the predicted probabilities, which is recommended for
          an ensemble of well-calibrated classifiers.
  
  n_jobs : int, default=-1
      The number of parallel jobs to run. None means 1 unless in
      a joblib.parallel_backend context. -1 means using all processors.
      Doesn’t affect fit method.
  
  References
  ----------
  Soares, R. G., Santana, A., Canuto, A. M., & de Souto, M. C. P.
  "Using accuracy and more_diverse to select classifiers to build ensembles."
  International Joint Conference on Neural Networks (IJCNN)., 2006.
  
  Britto, Alceu S., Robert Sabourin, and Luiz ES Oliveira. "Dynamic selection
  of classifiers—a comprehensive review."
  Pattern Recognition 47.11 (2014): 3665-3680.
  
  R. M. O. Cruz, R. Sabourin, and G. D. Cavalcanti, “Dynamic classifier
  selection: Recent advances and perspectives,”
  Information Fusion, vol. 41, pp. 195 – 216, 2018.
class_docstr_tok: ["Dynamic","ensemble","selection-Clustering","(","DES-Clustering",")",".","This","method","selects","an","ensemble","of","classifiers","taking","into","account","the","accuracy","and","diversity","of","the","base","classifiers",".","The","K-means","algorithm","is","used","to","define","the","region","of","competence",".","For","each","cluster",",","the","N","most","accurate","classifiers","are","first","selected",".","Then",",","the","J","more","diverse","classifiers","from","the","N","most","accurate","classifiers","are","selected","to","compose","the","ensemble",".","Parameters","--","--","--","--","--","pool_classifiers",":","list","of","classifiers","(","Default","=","None",")","The","generated_pool","of","classifiers","trained","for","the","corresponding","classification","problem",".","Each","base","classifiers","should","support","the","method","``","predict","''",".","If","None",",","then","the","pool","of","classifiers","is","a","bagging","classifier",".","clustering",":","sklearn.cluster","(","Default","=","None",")","The","clustering","model","used","to","estimate","the","region","of","competence",".","If","None",",","a","KMeans","with","K","=","5","is","used",".","pct_accuracy",":","float","(","Default","=","0.5",")","Percentage","of","base","classifiers","selected","based","on","accuracy","pct_diversity",":","float","(","Default","=","0.33",")","Percentage","of","base","classifiers","selected","based","on","diversity","more_diverse",":","Boolean","(","Default","=","True",")","Whether","we","select","the","most","or","the","least","diverse","classifiers","to","add","to","the","pre-selected","ensemble","metric_diversity",":","String","(","Default","=","'df","'",")","Metric","used","to","estimate","the","diversity","of","the","base","classifiers",".","Can","be","either","the","double","fault","(","df",")",",","Q-statistics","(","Q",")",",","or","error","correlation",".","metric_performance",":","String","(","Default","=","'accuracy_score","'",")","Metric","used","to","estimate","the","performance","of","a","base","classifier","on","a","cluster",".","Can","be","either","any","metric","from","sklearn.metrics",".","random_state",":","int",",","RandomState","instance","or","None",",","optional","(","default=None",")","If","int",",","random_state","is","the","seed","used","by","the","random","number","generator",";","If","RandomState","instance",",","random_state","is","the","random","number","generator",";","If","None",",","the","random","number","generator","is","the","RandomState","instance","used","by","`","np.random","`",".","DSEL_perc",":","float","(","Default","=","0.5",")","Percentage","of","the","input","data","used","to","fit","DSEL",".","Note",":","This","parameter","is","only","used","if","the","pool","of","classifier","is","None","or","unfitted",".","voting",":","{","'hard","'",",","'soft","'","}",",","default='hard'","If","'hard","'",",","uses","predicted","class","labels","for","majority","rule","voting",".","Else","if","'soft","'",",","predicts","the","class","label","based","on","the","argmax","of","the","sums","of","the","predicted","probabilities",",","which","is","recommended","for","an","ensemble","of","well-calibrated","classifiers",".","n_jobs",":","int",",","default=-1","The","number","of","parallel","jobs","to","run",".","None","means","1","unless","in","a","joblib.parallel_backend","context",".","-1","means","using","all","processors",".","Doesn","\u2019","t","affect","fit","method",".","References","--","--","--","--","--","Soares",",","R.","G.",",","Santana",",","A.",",","Canuto",",","A.","M.",",","&","de","Souto",",","M.","C.","P.","''","Using","accuracy","and","more_diverse","to","select","classifiers","to","build","ensembles",".","''","International","Joint","Conference","on","Neural","Networks","(","IJCNN",")",".",",","2006",".","Britto",",","Alceu","S.",",","Robert","Sabourin",",","and","Luiz","ES","Oliveira",".","``","Dynamic","selection","of","classifiers\u2014a","comprehensive","review",".","''","Pattern","Recognition","47.11","(","2014",")",":","3665-3680",".","R.","M.","O.","Cruz",",","R.","Sabourin",",","and","G.","D.","Cavalcanti",",","\u201c","Dynamic","classifier","selection",":","Recent","advances","and","perspectives",",","\u201d","Information","Fusion",",","vol",".","41",",","pp",".","195","\u2013","216",",","2018","."]
code: def get_scores_(self, sample_indices):
      def precision_function(label_predicted):
          targets = self.DSEL_target_[sample_indices]
          return self.metric_classifier_(targets, label_predicted)
  
      label_predicted = self.BKS_DSEL_[sample_indices, :]
      score_classifier = np.apply_along_axis(
          precision_function, 0, label_predicted
      )
  
      return score_classifier
  
imports: import warnings
  import numpy
  from sklearn import metrics
  from sklearn.base import ClusterMixin
  from sklearn.cluster import KMeans
  from deslib.base import BaseDS
  from deslib.util.aggregation import sum_votes_per_class
  from deslib.util.diversity import Q_statistic, ratio_errors, negative_double_fault, compute_pairwise_diversity
label_desc: Use image node_id 10 for calling the DESClustering obj's underlying member method code with example usage: obj.get_scores_(sample_indices) and returns: score_classifier, self