class_docstr: Counterfactual Reinforcement Learning Tabular. 
class_docstr_tok: ["Counterfactual","Reinforcement","Learning","Tabular","."]
code: def fit(self, X: np.ndarray) -> "Explainer":
      # Compute vector of statistics to clamp numerical values between the minimum and maximum
      # value from the training set.
      self.params["stats"] = get_statistics(
          X=X,
          preprocessor=self.params["encoder_preprocessor"],
          category_map=self.params["category_map"],
      )
  
      # Set postprocessing functions. Needs `stats`.
      self.params["postprocessing_funcs"] = [
          SampleTabularPostprocessing(
              stats=self.params["stats"],
              category_map=self.params["category_map"],
          ),
          ConcatTabularPostprocessing(),
      ]
  
      # update metadata
      self.meta["params"].update(
          CounterfactualRLTabular._serialize_params(self.params)
      )
  
      # validate dataset
      self._validate_input(X)
  
      # call base class fit
      return super().fit(X)
  
imports: from functools import partial
  from itertools import count
  from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Tuple, Union, cast
  import numpy
  from tqdm import tqdm
  from alibi.api.interfaces import Explainer, Explanation
  from alibi.explainers.backends.cfrl_tabular import get_conditional_vector, get_statistics, sample
  from alibi.explainers.cfrl_base import _PARAM_TYPES, CounterfactualRL, Postprocessing
  from alibi.utils.frameworks import has_pytorch, has_tensorflow
label_desc: Use image node_id 4 for calling the CounterfactualRLTabular obj's underlying member method code with example usage: obj.fit(X) and returns: super