class_docstr: Object returned by explainers.
docstr: Initializer.
  
  Args:
      domain_mapper: must inherit from DomainMapper class
      type: "classification" or "regression"
      class_names: list of class names (only used for classification)
      random_state: an integer or numpy.RandomState that will be used to
          generate random numbers. If None, the random state will be
          initialized using the internal numpy seed.
docstr_tok: ["Initializer",".","Args",":","domain_mapper",":","must","inherit","from","DomainMapper","class","type",":","``","classification","''","or","``","regression","''","class_names",":","list","of","class","names","(","only","used","for","classification",")","random_state",":","an","integer","or","numpy.RandomState","that","will","be","used","to","generate","random","numbers",".","If","None",",","the","random","state","will","be","initialized","using","the","internal","numpy","seed","."]
code: def __init__(
      self,
      domain_mapper,
      mode="classification",
      class_names=None,
      random_state=None,
  ):
      """
  
      Initializer.
  
      Args:
          domain_mapper: must inherit from DomainMapper class
          type: "classification" or "regression"
          class_names: list of class names (only used for classification)
          random_state: an integer or numpy.RandomState that will be used to
              generate random numbers. If None, the random state will be
              initialized using the internal numpy seed.
      """
      self.random_state = random_state
      self.mode = mode
      self.domain_mapper = domain_mapper
      self.local_exp = {}
      self.intercept = {}
      self.score = {}
      self.local_pred = {}
      if mode == "classification":
          self.class_names = class_names
          self.top_labels = None
          self.predict_proba = None
      elif mode == "regression":
          self.class_names = ["negative", "positive"]
          self.predicted_value = None
          self.min_value = 0.0
          self.max_value = 1.0
          self.dummy_label = 1
      else:
          raise LimeError(
              'Invalid explanation mode "{}". '
              'Should be either "classification" '
              'or "regression".'.format(mode)
          )
  
imports: from io import open
  import os
  import os.path
  import json
  import string
  import numpy
  from .exceptions import LimeError
  from sklearn.utils import check_random_state
label_desc: Use image node_id 1 to create a new Explanation object from inherited base classes: object with example: obj = Explanation(domain_mapper, mode, class_names, random_state)