class_docstr: Implementation of Avg-Sensitivity by Yeh at el., 2019.
  
  Using Monte Carlo sampling-based approximation while measuring how explanations
  change under slight perturbation - the average sensitivity is captured.
  
  References:
      1) Chih-Kuan Yeh et al. "On the (in) fidelity and sensitivity for explanations."
      NeurIPS (2019): 10965-10976.
      2) Umang Bhatt et al.: "Evaluating and aggregating
      feature-based model explanations."  IJCAI (2020): 3016-3022.
  
  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","Avg-Sensitivity","by","Yeh","at","el.",",","2019",".","Using","Monte","Carlo","sampling-based","approximation","while","measuring","how","explanations","change","under","slight","perturbation","-","the","average","sensitivity","is","captured",".","References",":","1",")","Chih-Kuan","Yeh","et","al",".","``","On","the","(","in",")","fidelity","and","sensitivity","for","explanations",".","''","NeurIPS","(","2019",")",":","10965-10976",".","2",")","Umang","Bhatt","et","al",".",":","``","Evaluating","and","aggregating","feature-based","model","explanations",".","''","IJCAI","(","2020",")",":","3016-3022",".","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
  ----------
  kwargs:
      Unused.
  
  Returns
  -------
  None
docstr_tok: ["Implementation","of","custom_preprocess_batch",".","Parameters","--","--","--","--","--","kwargs",":","Unused",".","Returns","--","--","--","-","None"]
code: def custom_preprocess(self, **kwargs) -> None:
      """
      Implementation of custom_preprocess_batch.
  
      Parameters
      ----------
      kwargs:
          Unused.
  
      Returns
      -------
      None
      """
      # Additional explain_func assert, as the one in prepare() won't be
      # executed when a_batch != None.
      asserts.assert_explain_func(explain_func=self.explain_func)
  
file_path: Quantus/quantus/metrics/robustness/avg_sensitivity.py
imports: import sys
  from typing import Any, Callable, Dict, List, Optional
  import numpy
  from quantus.functions import norm_func
  from quantus.functions.perturb_func import perturb_batch, uniform_noise
  from quantus.functions.similarity_func import difference
  from quantus.helpers import asserts, 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_changed_prediction_indices_func, make_perturb_func
  from quantus.metrics.base import Metric
label_desc: Use image node_id 4 for calling the AvgSensitivity obj's underlying member method code with example usage: obj.custom_preprocess() without return types