class_docstr: Base class for BoostSearch meta-estimator.
  
  Warning: This class should not be used directly. Use derived classes
  instead.
class_docstr_tok: ["Base","class","for","BoostSearch","meta-estimator",".","Warning",":","This","class","should","not","be","used","directly",".","Use","derived","classes","instead","."]
docstr: Private method to validate fitting parameters.
docstr_tok: ["Private","method","to","validate","fitting","parameters","."]
code: def _validate_param_grid(self, fit_params):
      """Private method to validate fitting parameters."""
  
      if not isinstance(self.param_grid, dict):
          raise ValueError("Pass param_grid in dict format.")
      self._param_grid = self.param_grid.copy()
  
      for p_k, p_v in self._param_grid.items():
          self._param_grid[p_k] = _check_param(p_v)
  
      if "eval_set" not in fit_params:
          raise ValueError(
              "When tuning parameters, at least "
              "a evaluation set is required."
          )
  
      self._eval_score = (
          np.argmax if self.greater_is_better else np.argmin
      )
      self._score_sign = -1 if self.greater_is_better else 1
  
      rs = ParameterSampler(
          n_iter=self.n_iter,
          param_distributions=self._param_grid,
          random_state=self.sampling_seed,
      )
      self._param_combi, self._tuning_type = rs.sample()
      self._trial_id = 1
  
      if self.verbose > 0:
          n_trials = (
              self.n_iter
              if self._tuning_type is "hyperopt"
              else len(self._param_combi)
          )
          print(
              "\n{} trials detected for {}\n".format(
                  n_trials, tuple(self.param_grid.keys())
              )
          )
  
imports: import io
  import contextlib
  import warnings
  import numpy
  import scipy
  from copy import deepcopy
  from sklearn.base import clone
  from sklearn.utils.validation import check_is_fitted
  from sklearn.base import BaseEstimator, TransformerMixin
  from joblib import Parallel, delayed
  from hyperopt import fmin, tpe
  from .utils import ParameterSampler, _check_param, _check_boosting
  from .utils import _set_categorical_indexes, _get_categorical_support
  from .utils import _feature_importances, _shap_importances
label_desc: Use image node_id 2 for calling the _BoostSearch obj's underlying member method code with example usage: obj._validate_param_grid(fit_params) without return types