class_docstr: Maps feature ids to names, generates table views, etc
class_docstr_tok: ["Maps","feature","ids","to","names",",","generates","table","views",",","etc"]
docstr: Shows the current example in a table format.
  
  Args:
       exp: list of tuples [(id, weight), (id,weight)]
       label: label id (integer)
       div_name: name of div object to be used for rendering(in js)
       exp_object_name: name of js explanation object
       show_table: if False, don't show table visualization.
       show_all: if True, show zero-weighted features in the table.
docstr_tok: ["Shows","the","current","example","in","a","table","format",".","Args",":","exp",":","list","of","tuples","[","(","id",",","weight",")",",","(","id",",","weight",")","]","label",":","label","id","(","integer",")","div_name",":","name","of","div","object","to","be","used","for","rendering","(","in","js",")","exp_object_name",":","name","of","js","explanation","object","show_table",":","if","False",",","do","n't","show","table","visualization",".","show_all",":","if","True",",","show","zero-weighted","features","in","the","table","."]
code: def visualize_instance_html(
      self,
      exp,
      label,
      div_name,
      exp_object_name,
      show_table=True,
      show_all=False,
  ):
      """Shows the current example in a table format.
  
      Args:
           exp: list of tuples [(id, weight), (id,weight)]
           label: label id (integer)
           div_name: name of div object to be used for rendering(in js)
           exp_object_name: name of js explanation object
           show_table: if False, don't show table visualization.
           show_all: if True, show zero-weighted features in the table.
      """
      if not show_table:
          return ""
      weights = [0] * len(self.feature_names)
      for x in exp:
          weights[x[0]] = x[1]
      if self.feature_indexes is not None:
          # Sparse case: only display the non-zero values and importances
          fnames = [
              self.exp_feature_names[i] for i in self.feature_indexes
          ]
          fweights = [weights[i] for i in self.feature_indexes]
          if show_all:
              out_list = list(
                  zip(fnames, self.feature_values, fweights)
              )
          else:
              out_dict = dict(
                  map(
                      lambda x: (x[0], (x[1], x[2], x[3])),
                      zip(
                          self.feature_indexes,
                          fnames,
                          self.feature_values,
                          fweights,
                      ),
                  )
              )
              out_list = [
                  out_dict.get(x[0], (str(x[0]), 0.0, 0.0)) for x in exp
              ]
      else:
          out_list = list(
              zip(self.exp_feature_names, self.feature_values, weights)
          )
          if not show_all:
              out_list = [out_list[x[0]] for x in exp]
      ret = """
              %s.show_raw_tabular(%s, %d, %s);
          """ % (
          exp_object_name,
          json.dumps(out_list, ensure_ascii=False),
          label,
          div_name,
      )
      return ret
  
imports: import collections
  import copy
  from functools import partial
  import json
  import warnings
  import numpy
  import scipy
  import sklearn
  import sklearn.preprocessing
  from sklearn.utils import check_random_state
  from pyDOE2 import lhs
  from scipy.stats.distributions import norm
  from lime.discretize import QuartileDiscretizer
  from lime.discretize import DecileDiscretizer
  from lime.discretize import EntropyDiscretizer
  from lime.discretize import BaseDiscretizer
  from lime.discretize import StatsDiscretizer
  from .None import explanation
  from .None import lime_base
label_desc: Use image node_id 3 for calling the TableDomainMapper obj's underlying member method code with example usage: obj.visualize_instance_html(exp, label, div_name, exp_object_name, show_table, show_all) and returns: ret, str