class_docstr: Tabular sampling post-processing. Given the output of the heterogeneous auto-encoder the post-processing
  functions samples the output according to the conditional vector. Note that the original input instance
  is required to perform the conditional sampling.
class_docstr_tok: ["Tabular","sampling","post-processing",".","Given","the","output","of","the","heterogeneous","auto-encoder","the","post-processing","functions","samples","the","output","according","to","the","conditional","vector",".","Note","that","the","original","input","instance","is","required","to","perform","the","conditional","sampling","."]
docstr: Performs counterfactual conditional sampling according to the conditional vector and the original input.
  
  Parameters
  ----------
  X_cf
      Decoder reconstruction of the counterfactual instance. The decoded instance is a list where each
      element in the list correspond to the reconstruction of a feature.
  X
      Input instance.
  C
      Conditional vector.
  
  Returns
  -------
  Conditional sampled counterfactual instance.
docstr_tok: ["Performs","counterfactual","conditional","sampling","according","to","the","conditional","vector","and","the","original","input",".","Parameters","--","--","--","--","--","X_cf","Decoder","reconstruction","of","the","counterfactual","instance",".","The","decoded","instance","is","a","list","where","each","element","in","the","list","correspond","to","the","reconstruction","of","a","feature",".","X","Input","instance",".","C","Conditional","vector",".","Returns","--","--","--","-","Conditional","sampled","counterfactual","instance","."]
code: def __call__(
      self,
      X_cf: List[np.ndarray],
      X: np.ndarray,
      C: Optional[np.ndarray],
  ) -> List[np.ndarray]:
      """
      Performs counterfactual conditional sampling according to the conditional vector and the original input.
  
      Parameters
      ----------
      X_cf
          Decoder reconstruction of the counterfactual instance. The decoded instance is a list where each
          element in the list correspond to the reconstruction of a feature.
      X
          Input instance.
      C
          Conditional vector.
  
      Returns
      -------
      Conditional sampled counterfactual instance.
      """
      return sample(
          X_hat_split=X_cf,
          X_ohe=X,
          C=C,
          stats=self.stats,
          category_map=self.category_map,
      )
  
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 2 for calling the SampleTabularPostprocessing obj's underlying member method code with example usage: obj.__call__(X_cf, X, C) and returns: sample