class_docstr: Base class for a dynamic classifier selection (dcs) and
     dynamic ensemble selection (des) methods.
  
  All DCS and DES techniques should inherit from this class.
  
  Warning: This class should not be used directly.
  Use derived classes instead.
docstr: Pre-Process the input X and y data into the dynamic selection
  dataset(DSEL) and get information about the structure of the data
  (e.g., n_classes, n_samples, classes)
  
  Parameters
  ----------
  X : array of shape (n_samples, n_features)
      The Input data.
  
  y : array of shape (n_samples)
      class labels of each sample in X.
docstr_tok: ["Pre-Process","the","input","X","and","y","data","into","the","dynamic","selection","dataset","(","DSEL",")","and","get","information","about","the","structure","of","the","data","(","e.g.",",","n_classes",",","n_samples",",","classes",")","Parameters","--","--","--","--","--","X",":","array","of","shape","(","n_samples",",","n_features",")","The","Input","data",".","y",":","array","of","shape","(","n_samples",")","class","labels","of","each","sample","in","X","."]
code: def _set_dsel(self, X, y):
      """Pre-Process the input X and y data into the dynamic selection
      dataset(DSEL) and get information about the structure of the data
      (e.g., n_classes, n_samples, classes)
  
      Parameters
      ----------
      X : array of shape (n_samples, n_features)
          The Input data.
  
      y : array of shape (n_samples)
          class labels of each sample in X.
      """
      self.DSEL_data_ = X
      self.DSEL_target_ = y
      self.n_classes_ = self.classes_.size
      self.n_features_ = X.shape[1]
      self.n_samples_ = self.DSEL_target_.size
  
imports: import functools
  import math
  import warnings
  from abc import abstractmethod, ABCMeta
  import numpy
  from scipy.stats import mode
  from sklearn.base import BaseEstimator, ClassifierMixin
  from sklearn.ensemble import BaseEnsemble, BaggingClassifier
  from sklearn.model_selection import train_test_split
  from sklearn.neighbors import KNeighborsClassifier
  from sklearn.preprocessing import LabelEncoder, normalize
  from sklearn.utils.validation import check_X_y, check_is_fitted, check_array, check_random_state
  from deslib.util import KNNE
  from deslib.util import faiss_knn_wrapper
  from deslib.util.dfp import frienemy_pruning_preprocessed
  from deslib.util.instance_hardness import hardness_region_competence
label_desc: Use image node_id 25 for calling the BaseDS obj's underlying member method code with example usage: obj._set_dsel(X, y) without return types