class_docstr: Implementation of the Attribution Localization by Kohlbrenner et al., 2020.
  
  Attribution Localization implements the ratio of positive attributions within the target to the overall
  attribution. High scores are desired, as it means, that the positively attributed pixels belong to the
  targeted object class.
  
  References:
      1) Max Kohlbrenner et al., "Towards Best Practice in Explaining Neural Network Decisions with LRP."
         IJCNN (2020): 1-7.
  
  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","Attribution","Localization","by","Kohlbrenner","et","al.",",","2020",".","Attribution","Localization","implements","the","ratio","of","positive","attributions","within","the","target","to","the","overall","attribution",".","High","scores","are","desired",",","as","it","means",",","that","the","positively","attributed","pixels","belong","to","the","targeted","object","class",".","References",":","1",")","Max","Kohlbrenner","et","al.",",","``","Towards","Best","Practice","in","Explaining","Neural","Network","Decisions","with","LRP",".","''","IJCNN","(","2020",")",":","1-7",".","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: Implementation of custom_preprocess_batch.
  
  Parameters
  ----------
  x_batch: np.ndarray
      A np.ndarray which contains the input data that are explained.
  s_batch: np.ndarray, optional
      A np.ndarray which contains segmentation masks that matches the input.
  kwargs:
      Unused.
  Returns
  -------
  None
docstr_tok: ["Implementation","of","custom_preprocess_batch",".","Parameters","--","--","--","--","--","x_batch",":","np.ndarray","A","np.ndarray","which","contains","the","input","data","that","are","explained",".","s_batch",":","np.ndarray",",","optional","A","np.ndarray","which","contains","segmentation","masks","that","matches","the","input",".","kwargs",":","Unused",".","Returns","--","--","--","-","None"]
code: def custom_preprocess(
      self,
      x_batch: np.ndarray,
      s_batch: np.ndarray,
      **kwargs,
  ) -> None:
      """
      Implementation of custom_preprocess_batch.
  
      Parameters
      ----------
      x_batch: np.ndarray
          A np.ndarray which contains the input data that are explained.
      s_batch: np.ndarray, optional
          A np.ndarray which contains segmentation masks that matches the input.
      kwargs:
          Unused.
      Returns
      -------
      None
      """
      # Asserts.
      asserts.assert_segmentations(x_batch=x_batch, s_batch=s_batch)
  
file_path: Quantus/quantus/metrics/localisation/attribution_localisation.py
imports: import sys
  from typing import 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 4 for calling the AttributionLocalisation obj's underlying member method code with example usage: obj.custom_preprocess(x_batch, s_batch) without return types