class_docstr: Exposes LIME tabular explainer from lime package, in interpret API form.
  If using this please cite the original authors as can be found here:
  https://github.com/marcotcr/lime/blob/master/citation.bib
class_docstr_tok: ["Exposes","LIME","tabular","explainer","from","lime","package",",","in","interpret","API","form",".","If","using","this","please","cite","the","original","authors","as","can","be","found","here",":","https",":","\/\/github.com\/marcotcr\/lime\/blob\/master\/citation.bib"]
docstr: Initializes class.
  
  Args:
      model: model or prediction function of model (predict_proba for classification or predict for regression)
      data: Data used to initialize LIME with.
      feature_names: List of feature names.
      feature_types: List of feature types.
      **kwargs: Kwargs that will be sent to lime
docstr_tok: ["Initializes","class",".","Args",":","model",":","model","or","prediction","function","of","model","(","predict_proba","for","classification","or","predict","for","regression",")","data",":","Data","used","to","initialize","LIME","with",".","feature_names",":","List","of","feature","names",".","feature_types",":","List","of","feature","types",".","*","*","kwargs",":","Kwargs","that","will","be","sent","to","lime"]
code: def __init__(
      self,
      model,
      data,
      feature_names=None,
      feature_types=None,
      **kwargs,
  ):
      """Initializes class.
  
      Args:
          model: model or prediction function of model (predict_proba for classification or predict for regression)
          data: Data used to initialize LIME with.
          feature_names: List of feature names.
          feature_types: List of feature types.
          **kwargs: Kwargs that will be sent to lime
      """
  
      from lime.lime_tabular import LimeTabularExplainer
  
      self.model = model
      self.feature_names = feature_names
      self.feature_types = feature_types
  
      data, n_samples = preclean_X(data, feature_names, feature_types)
  
      data, self.feature_names_in_, self.feature_types_in_ = unify_data(
          data, n_samples, feature_names, feature_types, False, 0
      )
  
      # LIME does not support string categoricals, and np.object_ is slower,
      # so convert to np.float64 until we implement some automatic categorical handling
      data = data.astype(np.float64, order="C", copy=False)
  
      # rewrite these even if the user specified them
      kwargs = kwargs.copy()
      kwargs["mode"] = "regression"
      kwargs["feature_names"] = self.feature_names_in_
  
      self.lime_ = LimeTabularExplainer(data, **kwargs)
  
file_path: interpret/python/interpret-core/interpret/blackbox/_lime.py
imports: from ..api.base import ExplainerMixin
  from ..api.templates import FeatureValueExplanation
  from ..utils._explanation import gen_name_from_class, gen_local_selector
  from ..utils._explanation import gen_perf_dicts
  import numpy
  from ..utils._clean_x import preclean_X
  from ..utils._clean_simple import clean_dimensions, typify_classification
  from ..utils._unify_predict import determine_classes, unify_predict_fn
  from ..utils._unify_data import unify_data
label_desc: Use image node_id 1 to create a new LimeTabular object from inherited base classes: ExplainerMixin with example: obj = LimeTabular(model, data, feature_names, feature_types)