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: Verify if the input parameters are correct (generated_pool and k)
  raises an error if k < 1 or generated_pool is not fitted.
docstr_tok: ["Verify","if","the","input","parameters","are","correct","(","generated_pool","and","k",")","raises","an","error","if","k","<","1","or","generated_pool","is","not","fitted","."]
code: def _validate_parameters(self):
      """Verify if the input parameters are correct (generated_pool and k)
      raises an error if k < 1 or generated_pool is not fitted.
      """
      if self.k is not None:
          if not isinstance(self.k, int):
              raise TypeError("parameter k should be an integer")
          if self.k <= 1:
              raise ValueError(
                  "parameter k must be higher than 1."
                  "input k is {} ".format(self.k)
              )
  
      if self.safe_k is not None:
          if not isinstance(self.safe_k, int):
              raise TypeError("parameter safe_k should be an integer")
          if self.safe_k <= 1:
              raise ValueError(
                  "parameter safe_k must be higher than 1."
                  "input safe_k is {} ".format(self.safe_k)
              )
  
      # safe_k should be equals or lower the neighborhood size k.
      if self.safe_k is not None and self.k is not None:
          if self.safe_k > self.k:
              raise ValueError(
                  "parameter safe_k must be equal or less than parameter k."
                  "input safe_k is {} and k is {}".format(
                      self.k, self.safe_k
                  )
              )
      if not isinstance(self.IH_rate, float):
          raise TypeError(
              "parameter IH_rate should be a float between [0.0, 0.5]"
          )
      if self.IH_rate < 0 or self.IH_rate > 0.5:
          raise ValueError(
              "Parameter IH_rate should be between [0.0, 0.5]."
              "IH_rate = {}".format(self.IH_rate)
          )
  
      self._validate_pool_classifiers()
      # validate the value of k
      self._validate_k()
      # validate the IH
      if self.with_IH:
          self._validate_ih()
  
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 31 for calling the BaseDS obj's underlying member method code with example usage: obj._validate_parameters() without return types