docstr: Explains the prediction made by a classifier on instance `X`. Sampling is done in parallel over a number of
  cores specified in `kwargs['ncpu']`.
  
  Parameters
  ----------
  X, threshold, delta, tau, batch_size, coverage_samples, beam_size, stop_on_first, max_anchor_size,         min_samples_start, n_covered_ex, binary_cache_size, cache_margin, verbose, verbose_every, **kwargs
      See :py:meth:`alibi.explainers.anchors.anchor_tabular.AnchorTabular.explain`.
  
  Returns
  -------
  See :py:meth:`alibi.explainers.anchors.anchor_tabular.AnchorTabular.explain` superclass.
docstr_tok: ["Explains","the","prediction","made","by","a","classifier","on","instance","`","X","`",".","Sampling","is","done","in","parallel","over","a","number","of","cores","specified","in","`","kwargs","[","'ncpu","'","]","`",".","Parameters","--","--","--","--","--","X",",","threshold",",","delta",",","tau",",","batch_size",",","coverage_samples",",","beam_size",",","stop_on_first",",","max_anchor_size",",","min_samples_start",",","n_covered_ex",",","binary_cache_size",",","cache_margin",",","verbose",",","verbose_every",",","*","*","kwargs","See",":","py",":","meth",":","`","alibi.explainers.anchors.anchor_tabular.AnchorTabular.explain","`",".","Returns","--","--","--","-","See",":","py",":","meth",":","`","alibi.explainers.anchors.anchor_tabular.AnchorTabular.explain","`","superclass","."]
code: def explain(
      self,
      X: np.ndarray,
      threshold: float = 0.95,
      delta: float = 0.1,
      tau: float = 0.15,
      batch_size: int = 100,
      coverage_samples: int = 10000,
      beam_size: int = 1,
      stop_on_first: bool = False,
      max_anchor_size: Optional[int] = None,
      min_samples_start: int = 1,
      n_covered_ex: int = 10,
      binary_cache_size: int = 10000,
      cache_margin: int = 1000,
      verbose: bool = False,
      verbose_every: int = 1,
      **kwargs: Any,
  ) -> Explanation:
      """
          Explains the prediction made by a classifier on instance `X`. Sampling is done in parallel over a number of
          cores specified in `kwargs['ncpu']`.
  
          Parameters
          ----------
          X, threshold, delta, tau, batch_size, coverage_samples, beam_size, stop_on_first, max_anchor_size, \
          min_samples_start, n_covered_ex, binary_cache_size, cache_margin, verbose, verbose_every, **kwargs
              See :py:meth:`alibi.explainers.anchors.anchor_tabular.AnchorTabular.explain`.
  
          Returns
          -------
          See :py:meth:`alibi.explainers.anchors.anchor_tabular.AnchorTabular.explain` superclass.
          """
      # transform one-hot encodings to labels if ohe == True
      X = (
          ohe_to_ord(
              X_ohe=X.reshape(1, -1), cat_vars_ohe=self.cat_vars_ohe
          )[0].reshape(-1)
          if self.ohe
          else X
      )
  
      # get params for storage in meta
      params = locals()
      remove = ["X", "self"]
      for key in remove:
          params.pop(key)
  
      for sampler in self.samplers:
          label = sampler.set_instance_label.remote(X)
          sampler.set_n_covered.remote(n_covered_ex)
  
      self.instance_label = ray.get(label)
  
      # build feature encoding and mappings from the instance values to database rows where similar records are found
      # get anchors and add metadata
      self._build_sampling_lookups(X)
      mab = DistributedAnchorBaseBeam(
          samplers=self.samplers,
          sample_cache_size=binary_cache_size,
          cache_margin=cache_margin,
          **kwargs,
      )
      result: Any = mab.anchor_beam(
          delta=delta,
          epsilon=tau,
          desired_confidence=threshold,
          beam_size=beam_size,
          min_samples_start=min_samples_start,
          max_anchor_size=max_anchor_size,
          batch_size=batch_size,
          coverage_samples=coverage_samples,
          verbose=verbose,
          verbose_every=verbose_every,
      )
      self.mab = mab
  
      return self._build_explanation(
          X, result, self.instance_label, params
      )
  
imports: import logging
  from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
  import numpy
  import ray
  from alibi.api.interfaces import Explanation
  from alibi.utils.discretizer import Discretizer
  from alibi.utils.mapping import ohe_to_ord
  from .anchor_base import AnchorBaseBeam
  from .anchor_tabular import AnchorTabular, TabularSampler
  from alibi.utils.distributed import ActorPool
  from functools import partial
label_desc: Use image node_id 4 for calling the DistributedAnchorTabular obj's underlying member method code with example usage: obj.explain(X, threshold, delta, tau, batch_size, coverage_samples, beam_size, stop_on_first, max_anchor_size, min_samples_start, n_covered_ex, binary_cache_size, cache_margin, verbose, verbose_every) and returns: self