class_docstr: Relative Input Stability leverages the stability of an explanation with respect to the change in the input data.
  
      `RIS(x, x', e_x, e_x') = max \frac{||\frac{e_x - e_{x'}}{e_x}||_p}
      {max (||\frac{x - x'}{x}||_p, \epsilon_{min})}`
  
  References:
      1) Chirag Agarwal, et. al., 2022. "Rethinking stability for attribution based explanations.",
      https://arxiv.org/abs/2203.06877
  
  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: ["Relative","Input","Stability","leverages","the","stability","of","an","explanation","with","respect","to","the","change","in","the","input","data",".","`","RIS","(","x",",","x","'",",","e_x",",","e_x","'",")","=","max","\\frac","{","||\\frac","{","e_x","-","e_","{","x","'","}","}","{","e_x","}","||_p","}","{","max","(","||\\frac","{","x","-","x","'","}","{","x","}","||_p",",","\\epsilon_","{","min","}",")","}","`","References",":","1",")","Chirag","Agarwal",",","et",".","al.",",","2022",".","``","Rethinking","stability","for","attribution","based","explanations",".","``",",","https",":","\/\/arxiv.org\/abs\/2203.06877","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: Computes relative input stabilities maximization objective
  as defined here :ref:`https://arxiv.org/pdf/2203.06877.pdf` by the authors.
  
  Parameters
  ----------
  x: np.ndarray
      Batch of images.
  xs: np.ndarray
      Batch of perturbed images.
  e_x: np.ndarray
      Explanations for x.
  e_xs: np.ndarray
      Explanations for xs.
  
  Returns
  -------
  ris_obj: np.ndarray
      RIS maximization objective.
docstr_tok: ["Computes","relative","input","stabilities","maximization","objective","as","defined","here",":","ref",":","`","https",":","\/\/arxiv.org\/pdf\/2203.06877.pdf","`","by","the","authors",".","Parameters","--","--","--","--","--","x",":","np.ndarray","Batch","of","images",".","xs",":","np.ndarray","Batch","of","perturbed","images",".","e_x",":","np.ndarray","Explanations","for","x.","e_xs",":","np.ndarray","Explanations","for","xs",".","Returns","--","--","--","-","ris_obj",":","np.ndarray","RIS","maximization","objective","."]
file_path: Quantus/quantus/metrics/robustness/relative_input_stability.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Callable, Dict, List, Optional
  import numpy
  import sys
  from quantus.functions.normalise_func import normalise_by_average_second_moment_estimate
  from quantus.functions.perturb_func import perturb_batch, uniform_noise
  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.helpers.warn import warn_parameterisation
  from quantus.metrics.base import Metric
label_desc: Use image node_id 3 for calling the RelativeInputStability obj's underlying member method code with example usage: obj.relative_input_stability_objective(x, xs, e_x, e_xs) and returns: unknown