class_docstr: Time Series Local Interpretable Model-agnostic Explainer (TSLime) is a model-agnostic local time series
  explainer. LIME (Locally interpretable Model agnostic explainer) is a popular algorithm for local
  explanation. LIME explains the model behavior by approximating the model response with linear models.
  LIME algorithm specifically assumes tabular data format, where each row is a data point, and columns
  are features. A generalization of LIME algorithm for image data uses super pixel based perturbation.
  TSLIME generalizes LIME algorithm for time series context.
  
  TSLIME uses time series perturbation methods to produce a local input perturbation, and linear model
  surrogate which best approximates the model response. TSLime produces an interpretable explanation.
  The explanation weights produced by the TSLime explanation indicates model local sensitivity.
  
  References:
      .. [#0] `Ribeiro et al. '"Why Should I Trust You?": Explaining the Predictions of Any Classifier'
          <https://arxiv.org/abs/1602.04938>`_
class_docstr_tok: ["Time","Series","Local","Interpretable","Model-agnostic","Explainer","(","TSLime",")","is","a","model-agnostic","local","time","series","explainer",".","LIME","(","Locally","interpretable","Model","agnostic","explainer",")","is","a","popular","algorithm","for","local","explanation",".","LIME","explains","the","model","behavior","by","approximating","the","model","response","with","linear","models",".","LIME","algorithm","specifically","assumes","tabular","data","format",",","where","each","row","is","a","data","point",",","and","columns","are","features",".","A","generalization","of","LIME","algorithm","for","image","data","uses","super","pixel","based","perturbation",".","TSLIME","generalizes","LIME","algorithm","for","time","series","context",".","TSLIME","uses","time","series","perturbation","methods","to","produce","a","local","input","perturbation",",","and","linear","model","surrogate","which","best","approximates","the","model","response",".","TSLime","produces","an","interpretable","explanation",".","The","explanation","weights","produced","by","the","TSLime","explanation","indicates","model","local","sensitivity",".","References",":","..","[","#","0","]","`","Ribeiro","et","al",".","'","''","Why","Should","I","Trust","You","?","``",":","Explaining","the","Predictions","of","Any","Classifier'","<","https",":","\/\/arxiv.org\/abs\/1602.04938",">","`","_"]
docstr: Explain the prediction made by the time series model at a certain point in time
  (**local explanation**).
  
  Args:
      ts (tsFrame): Input time series signal in ``tsFrame`` format. This can
          be generated using :py:mod:`aix360.algorithms.tsframe.tsFrame`.
          A ``tsFrame`` is a pandas ``DataFrame`` indexed by ``Timestamp`` objects
          (that is ``DatetimeIndex``). Each column corresponds to an input feature.
      explain_params: Arbitrary explainer parameters.
  
  Returns:
      dict: explanation object
          Dictionary with keys: input_data, history_weights, model_prediction,
          surrogate_prediction, x_perturbations, y_perturbations.
docstr_tok: ["Explain","the","prediction","made","by","the","time","series","model","at","a","certain","point","in","time","(","*","*","local","explanation","*","*",")",".","Args",":","ts","(","tsFrame",")",":","Input","time","series","signal","in","``","tsFrame","``","format",".","This","can","be","generated","using",":","py",":","mod",":","`","aix360.algorithms.tsframe.tsFrame","`",".","A","``","tsFrame","``","is","a","pandas","``","DataFrame","``","indexed","by","``","Timestamp","``","objects","(","that","is","``","DatetimeIndex","``",")",".","Each","column","corresponds","to","an","input","feature",".","explain_params",":","Arbitrary","explainer","parameters",".","Returns",":","dict",":","explanation","object","Dictionary","with","keys",":","input_data",",","history_weights",",","model_prediction",",","surrogate_prediction",",","x_perturbations",",","y_perturbations","."]
code: def explain_instance(self, ts: tsFrame, **explain_params):
      """Explain the prediction made by the time series model at a certain point in time
      (**local explanation**).
  
      Args:
          ts (tsFrame): Input time series signal in ``tsFrame`` format. This can
              be generated using :py:mod:`aix360.algorithms.tsframe.tsFrame`.
              A ``tsFrame`` is a pandas ``DataFrame`` indexed by ``Timestamp`` objects
              (that is ``DatetimeIndex``). Each column corresponds to an input feature.
          explain_params: Arbitrary explainer parameters.
  
      Returns:
          dict: explanation object
              Dictionary with keys: input_data, history_weights, model_prediction,
              surrogate_prediction, x_perturbations, y_perturbations.
      """
      return super(TSLimeExplainer, self).explain_instance(
          ts=ts, ts_related=None, **explain_params
      )
  
file_path: AIX360/aix360/algorithms/tslime/tslime.py
imports: import warnings
  import numpy
  import pandas
  from typing import Union, List, Callable
  from aix360.algorithms.tslbbe import TSLocalBBExplainer
  from aix360.algorithms.tsutils.tsframe import tsFrame, to_np_array
  from aix360.algorithms.tslime.surrogate import linear_surrogate_weights, LinearSurrogateModel
  from aix360.algorithms.tsutils.tsperturbers.perturbed_data_generator import PerturbedDataGenerator
  from aix360.algorithms.tsutils.tsperturbers.tsperturber import TSPerturber, BlockSelector
label_desc: Use image node_id 6 for calling the TSLimeExplainer obj's underlying member method code with example usage: obj.explain_instance(ts) and returns: super