class_docstr: Implementation of Monotonicity Correlation metric by Nguyen at el., 2020.
  
  Monotonicity measures the (Spearman’s) correlation coefficient of the absolute values of the attributions
  and the uncertainty in probability estimation. The paper argues that if attributions are not monotonic
  then they are not providing the correct importance of the feature.
  
  References:
      1) An-phi Nguyen and María Rodríguez Martínez.: "On quantitative aspects of model
      interpretability." arXiv preprint arXiv:2007.07584 (2020).
  
  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","Monotonicity","Correlation","metric","by","Nguyen","at","el.",",","2020",".","Monotonicity","measures","the","(","Spearman","\u2019","s",")","correlation","coefficient","of","the","absolute","values","of","the","attributions","and","the","uncertainty","in","probability","estimation",".","The","paper","argues","that","if","attributions","are","not","monotonic","then","they","are","not","providing","the","correct","importance","of","the","feature",".","References",":","1",")","An-phi","Nguyen","and","Mar\u00eda","Rodr\u00edguez","Mart\u00ednez",".",":","``","On","quantitative","aspects","of","model","interpretability",".","''","arXiv","preprint","arXiv:2007.07584","(","2020",")",".","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.
  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",".","kwargs",":","Unused",".","Returns","--","--","--","-","None"]
code: def custom_preprocess(
      self,
      x_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.
      kwargs:
          Unused.
  
      Returns
      -------
      None
      """
      # Asserts.
      asserts.assert_features_in_step(
          features_in_step=self.features_in_step,
          input_shape=x_batch.shape[2:],
      )
  
file_path: Quantus/quantus/metrics/faithfulness/monotonicity_correlation.py
imports: import sys
  from typing import Any, Callable, Dict, List, Optional
  import numpy
  from quantus.functions.perturb_func import baseline_replacement_by_indices
  from quantus.functions.similarity_func import correlation_spearman
  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_perturb_func
  from quantus.metrics.base import Metric
label_desc: Use image node_id 4 for calling the MonotonicityCorrelation obj's underlying member method code with example usage: obj.custom_preprocess(x_batch) without return types