class_docstr: Implementation of the Continuity test by Montavon et al., 2018.
  
  The test measures the strongest variation of the explanation in the input domain i.e.,
  ||R(x) - R(x')||_1 / ||x - x'||_2
  where R(x) is the explanation for input x and x' is the perturbed input.
  
  Assumptions:
      - The original metric definition relies on perturbation functionality suited only for images.
      Therefore, only apply the metric to 3-dimensional (image) data. To extend the applicablity
      to other data domains, adjustments to the current implementation might be necessary.
  
  References:
      1) Grégoire Montavon et al.: "Methods for interpreting and
      understanding deep neural networks." Digital Signal Processing 73 (2018): 1-15.
  
  Attributes:
      -  _name: The name of the metric.
      - _data_applicability: The data types that the metric implementation currently supports.
      - _models: The model types that this metric can work with.
      - score_direction: How to interpret the scores, whether higher/ lower values are considered better.
      - evaluation_category: What property/ explanation quality that this metric measures.
class_docstr_tok: ["Implementation","of","the","Continuity","test","by","Montavon","et","al.",",","2018",".","The","test","measures","the","strongest","variation","of","the","explanation","in","the","input","domain","i.e.",",","||R","(","x",")","-","R","(","x","'",")","||_1","\/","||x","-","x'||_2","where","R","(","x",")","is","the","explanation","for","input","x","and","x","'","is","the","perturbed","input",".","Assumptions",":","-","The","original","metric","definition","relies","on","perturbation","functionality","suited","only","for","images",".","Therefore",",","only","apply","the","metric","to","3-dimensional","(","image",")","data",".","To","extend","the","applicablity","to","other","data","domains",",","adjustments","to","the","current","implementation","might","be","necessary",".","References",":","1",")","Gr\u00e9goire","Montavon","et","al",".",":","``","Methods","for","interpreting","and","understanding","deep","neural","networks",".","''","Digital","Signal","Processing","73","(","2018",")",":","1-15",".","Attributes",":","-","_name",":","The","name","of","the","metric",".","-","_data_applicability",":","The","data","types","that","the","metric","implementation","currently","supports",".","-","_models",":","The","model","types","that","this","metric","can","work","with",".","-","score_direction",":","How","to","interpret","the","scores",",","whether","higher\/","lower","values","are","considered","better",".","-","evaluation_category",":","What","property\/","explanation","quality","that","this","metric","measures","."]
docstr: This method performs XAI evaluation on a single batch of explanations.
  For more information on the specific logic, we refer the metric’s initialisation docstring.
  
  Parameters
  ----------
  model:
      A model that is subject to explanation.
  x_batch:
      A np.ndarray which contains the input data that are explained.
  y_batch:
      A np.ndarray which contains the output labels that are explained.
  kwargs:
      Unused.
  
  Returns
  -------
  scores_batch:
      Evaluation results.
docstr_tok: ["This","method","performs","XAI","evaluation","on","a","single","batch","of","explanations",".","For","more","information","on","the","specific","logic",",","we","refer","the","metric","\u2019","s","initialisation","docstring",".","Parameters","--","--","--","--","--","model",":","A","model","that","is","subject","to","explanation",".","x_batch",":","A","np.ndarray","which","contains","the","input","data","that","are","explained",".","y_batch",":","A","np.ndarray","which","contains","the","output","labels","that","are","explained",".","kwargs",":","Unused",".","Returns","--","--","--","-","scores_batch",":","Evaluation","results","."]
code: def evaluate_batch(
      self,
      model: ModelInterface,
      x_batch: np.ndarray,
      y_batch: np.ndarray,
      **kwargs,
  ) -> List[Dict[str, int]]:
      """
      This method performs XAI evaluation on a single batch of explanations.
      For more information on the specific logic, we refer the metric’s initialisation docstring.
  
      Parameters
      ----------
      model:
          A model that is subject to explanation.
      x_batch:
          A np.ndarray which contains the input data that are explained.
      y_batch:
          A np.ndarray which contains the output labels that are explained.
      kwargs:
          Unused.
  
      Returns
      -------
      scores_batch:
          Evaluation results.
      """
      return [
          self.evaluate_instance(model=model, x=x, y=y)
          for x, y in zip(x_batch, y_batch)
      ]
  
file_path: Quantus/quantus/metrics/robustness/continuity.py
imports: import itertools
  import sys
  from typing import Any, Callable, Dict, List, Optional
  import numpy
  from quantus.functions.perturb_func import translation_x_direction
  from quantus.functions.similarity_func import lipschitz_constant
  from quantus.helpers import asserts, utils, warn
  from quantus.helpers.enums import DataType, EvaluationCategory, ModelType, ScoreDirection
  from quantus.helpers.model.model_interface import ModelInterface
  from quantus.helpers.perturbation_utils import make_perturb_func
  from quantus.metrics.base import Metric
label_desc: Use image node_id 6 for calling the Continuity obj's underlying member method code with example usage: obj.evaluate_batch(model, x_batch, y_batch) and returns: unknown