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: Implements a continuity correlation score (an addition to the original method) to evaluate the
  relationship between change in explanation and change in function output. It can be seen as an
  quantitative interpretation of visually determining how similar f(x) and R(x1) curves are.
docstr_tok: ["Implements","a","continuity","correlation","score","(","an","addition","to","the","original","method",")","to","evaluate","the","relationship","between","change","in","explanation","and","change","in","function","output",".","It","can","be","seen","as","an","quantitative","interpretation","of","visually","determining","how","similar","f","(","x",")","and","R","(","x1",")","curves","are","."]
code: def aggregated_score(self):
      """
      Implements a continuity correlation score (an addition to the original method) to evaluate the
      relationship between change in explanation and change in function output. It can be seen as an
      quantitative interpretation of visually determining how similar f(x) and R(x1) curves are.
      """
      return np.mean(
          [
              self.similarity_func(
                  self.evaluation_scores[sample][self.nr_patches],
                  self.evaluation_scores[sample][ix_patch],
              )  # noqa
              for ix_patch in range(self.nr_patches)
              for sample in self.evaluation_scores.keys()
          ]
      )
  
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 5 for calling the Continuity obj's underlying member method code with example usage: obj.aggregated_score() and returns: np