class_docstr: Implementation of the Relevance Rank Accuracy by Arras et al., 2021.
  
  The Relevance Rank Accuracy measures the ratio of high intensity relevances within the ground truth mask GT.
  With P_top-k being the set of pixels sorted by there relevance in decreasing order until the k-th pixels,
  the rank accuracy is computed as: rank accuracy = (|P_top-k intersect GT|) / |GT|. High scores are desired,
  as the pixels with the highest positively attributed scores should be within the bounding box of the targeted
  object.
  
  References:
      1) Leila Arras et al.: "CLEVR-XAI: A benchmark dataset for the ground
      truth evaluation of neural network explanations." Inf. Fusion 81 (2022): 14-40.
  
  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","Relevance","Rank","Accuracy","by","Arras","et","al.",",","2021",".","The","Relevance","Rank","Accuracy","measures","the","ratio","of","high","intensity","relevances","within","the","ground","truth","mask","GT",".","With","P_top-k","being","the","set","of","pixels","sorted","by","there","relevance","in","decreasing","order","until","the","k-th","pixels",",","the","rank","accuracy","is","computed","as",":","rank","accuracy","=","(","|P_top-k","intersect","GT|",")","\/","|GT|",".","High","scores","are","desired",",","as","the","pixels","with","the","highest","positively","attributed","scores","should","be","within","the","bounding","box","of","the","targeted","object",".","References",":","1",")","Leila","Arras","et","al",".",":","``","CLEVR-XAI",":","A","benchmark","dataset","for","the","ground","truth","evaluation","of","neural","network","explanations",".","''","Inf",".","Fusion","81","(","2022",")",":","14-40",".","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
  ----------
  a_batch:
      A np.ndarray which contains pre-computed attributions i.e., explanations.
  s_batch:
      A np.ndarray which contains segmentation masks that matches the input.
  kwargs:
      Unused
  
  Returns
  -------
  scores_batch:
      Evaluation result for batch.
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","--","--","--","--","--","a_batch",":","A","np.ndarray","which","contains","pre-computed","attributions","i.e.",",","explanations",".","s_batch",":","A","np.ndarray","which","contains","segmentation","masks","that","matches","the","input",".","kwargs",":","Unused","Returns","--","--","--","-","scores_batch",":","Evaluation","result","for","batch","."]
code: def evaluate_batch(
      self, a_batch: np.ndarray, s_batch: np.ndarray, **kwargs
  ) -> 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
      ----------
      a_batch:
          A np.ndarray which contains pre-computed attributions i.e., explanations.
      s_batch:
          A np.ndarray which contains segmentation masks that matches the input.
      kwargs:
          Unused
  
      Returns
      -------
      scores_batch:
          Evaluation result for batch.
      """
      return [
          self.evaluate_instance(a=a, s=s)
          for a, s in zip(a_batch, s_batch)
      ]
  
file_path: Quantus/quantus/metrics/localisation/relevance_rank_accuracy.py
imports: import sys
  from typing import Any, Callable, Dict, List, Optional
  import numpy
  from quantus.helpers import asserts, warn
  from quantus.helpers.enums import DataType, EvaluationCategory, ModelType, ScoreDirection
  from quantus.metrics.base import Metric
label_desc: Use image node_id 5 for calling the RelevanceRankAccuracy obj's underlying member method code with example usage: obj.evaluate_batch(a_batch, s_batch) and returns: unknown