class_docstr: Base class for BoostRFA meta-estimator.
  
  Warning: This class should not be used directly. Use derived classes
  instead.
class_docstr_tok: ["Base","class","for","BoostRFA","meta-estimator",".","Warning",":","This","class","should","not","be","used","directly",".","Use","derived","classes","instead","."]
docstr: Return the score for a fit on eval_set.
docstr_tok: ["Return","the","score","for","a","fit","on","eval_set","."]
code: def _step_score(self, estimator):
      """Return the score for a fit on eval_set."""
  
      if self.boost_type_ == "LGB":
          valid_id = list(estimator.best_score_.keys())[-1]
          eval_metric = list(estimator.best_score_[valid_id])[-1]
          score = estimator.best_score_[valid_id][eval_metric]
      else:
          # w/ eval_set and w/ early_stopping_rounds
          if hasattr(estimator, "best_score"):
              score = estimator.best_score
          # w/ eval_set and w/o early_stopping_rounds
          else:
              valid_id = list(estimator.evals_result_.keys())[-1]
              eval_metric = list(estimator.evals_result_[valid_id])[-1]
              score = estimator.evals_result_[valid_id][eval_metric][-1]
  
      return score
  
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 3 for calling the _RFA obj's underlying member method code with example usage: obj._step_score(estimator) and returns: score