class_docstr: Simply wrap of lime.lime_tabular.LimeTabularExplainer into the common shap interface.
  
  Parameters
  ----------
  model : function or iml.Model
      User supplied function that takes a matrix of samples (# samples x # features) and
      computes the output of the model for those samples. The output can be a vector
      (# samples) or a matrix (# samples x # model outputs).
  
  data : numpy.array
      The background dataset.
  
  mode : "classification" or "regression"
      Control the mode of LIME tabular.
code: def __init__(self, model, data, mode="classification"):
      self.model = model
      if mode not in ["classification", "regression"]:
          emsg = f"Invalid mode {mode!r}, must be one of 'classification' or 'regression'"
          raise ValueError(emsg)
      self.mode = mode
  
      if isinstance(data, pd.DataFrame):
          data = data.values
      self.data = data
      self.explainer = lime.lime_tabular.LimeTabularExplainer(
          data, mode=mode
      )
  
      out = self.model(data[0:1])
      if len(out.shape) == 1:
          self.out_dim = 1
          self.flat_out = True
          if mode == "classification":
  
              def pred(X):  # assume that 1d outputs are probabilities
                  preds = self.model(X).reshape(-1, 1)
                  p0 = 1 - preds
                  return np.hstack((p0, preds))
  
              self.model = pred
      else:
          self.out_dim = self.model(data[0:1]).shape[1]
          self.flat_out = False
  
imports: import numpy
  import pandas
  from .._explainer import Explainer
label_desc: Use image node_id 1 to create a new LimeTabular object from inherited base classes: Explainer with example: obj = LimeTabular(model, data, mode)