class_docstr: Implementation of Pixel-Flipping experiment by Bach et al., 2015.
  
  The basic idea is to compute a decomposition of a digit for a digit class
  and then flip pixels with highly positive, highly negative scores or pixels
  with scores close to zero and then to evaluate the impact of these flips
  onto the prediction scores (mean prediction is calculated).
  
  References:
      1) Sebastian Bach et al.: "On pixel-wise explanations for non-linear classifier
      decisions by layer-wise relevance propagation." PloS one 10.7 (2015): e0130140.
  
  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","Pixel-Flipping","experiment","by","Bach","et","al.",",","2015",".","The","basic","idea","is","to","compute","a","decomposition","of","a","digit","for","a","digit","class","and","then","flip","pixels","with","highly","positive",",","highly","negative","scores","or","pixels","with","scores","close","to","zero","and","then","to","evaluate","the","impact","of","these","flips","onto","the","prediction","scores","(","mean","prediction","is","calculated",")",".","References",":","1",")","Sebastian","Bach","et","al",".",":","``","On","pixel-wise","explanations","for","non-linear","classifier","decisions","by","layer-wise","relevance","propagation",".","''","PloS","one","10.7","(","2015",")",":","e0130140",".","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: ModelInterface
      A ModelInteface that is subject to explanation.
  x_batch: np.ndarray
      The input to be evaluated on a batch-basis.
  y_batch: np.ndarray
      The output to be evaluated on a batch-basis.
  a_batch: np.ndarray
      The explanation to be evaluated on a batch-basis.
  kwargs:
      Unused.
  
  Returns
  -------
  scores_batch:
      The 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",":","ModelInterface","A","ModelInteface","that","is","subject","to","explanation",".","x_batch",":","np.ndarray","The","input","to","be","evaluated","on","a","batch-basis",".","y_batch",":","np.ndarray","The","output","to","be","evaluated","on","a","batch-basis",".","a_batch",":","np.ndarray","The","explanation","to","be","evaluated","on","a","batch-basis",".","kwargs",":","Unused",".","Returns","--","--","--","-","scores_batch",":","The","evaluation","results","."]
code: def evaluate_batch(
      self,
      model: ModelInterface,
      x_batch: np.ndarray,
      y_batch: np.ndarray,
      a_batch: np.ndarray,
      **kwargs,
  ) -> List[Union[float, List[float]]]:
      """
      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: ModelInterface
          A ModelInteface that is subject to explanation.
      x_batch: np.ndarray
          The input to be evaluated on a batch-basis.
      y_batch: np.ndarray
          The output to be evaluated on a batch-basis.
      a_batch: np.ndarray
          The explanation to be evaluated on a batch-basis.
      kwargs:
          Unused.
  
      Returns
      -------
      scores_batch:
          The evaluation results.
      """
      return [
          self.evaluate_instance(model=model, x=x, y=y, a=a)
          for x, y, a in zip(x_batch, y_batch, a_batch)
      ]
  
file_path: Quantus/quantus/metrics/faithfulness/pixel_flipping.py
imports: import sys
  from typing import Any, Callable, Dict, List, Optional, Union
  import numpy
  from quantus.functions.perturb_func import baseline_replacement_by_indices
  from quantus.helpers import asserts, plotting, 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 PixelFlipping obj's underlying member method code with example usage: obj.evaluate_batch(model, x_batch, y_batch, a_batch) and returns: unknown