class_docstr: A SaliencyMask class that implements the integrated gradients method.
docstr: This function computes the integrated gradients which measure the importance of each edge to the prediction score of 'class_of_interest'
  for node 'node_id'.
  
  Args:
  node_id (int): The node ID in the StellarGraph object.
  class_of_interest (int): The  class of interest for which the saliency maps are computed.
  steps (int): The number of values we need to interpolate. Generally steps = 20 should give good enough results.        non_exist_edge (bool): Setting to True allows the function to get the importance for non-exist edges. This is useful when we want to understand
      adding which edges could change the current predictions. But the results for existing edges are not reliable. Simiarly, setting to False ((A_baseline = all zero matrix))
      could only accurately measure the importance of existing edges.
  
  return (Numpy array): shape the same with A_val. Integrated gradients for the links.
code: def get_link_importance(
      self, node_id, class_of_interest, steps=20, non_exist_edge=False
  ):
      """
          This function computes the integrated gradients which measure the importance of each edge to the prediction score of 'class_of_interest'
          for node 'node_id'.
  
          Args:
          node_id (int): The node ID in the StellarGraph object.
          class_of_interest (int): The  class of interest for which the saliency maps are computed.
          steps (int): The number of values we need to interpolate. Generally steps = 20 should give good enough results.\
          non_exist_edge (bool): Setting to True allows the function to get the importance for non-exist edges. This is useful when we want to understand
              adding which edges could change the current predictions. But the results for existing edges are not reliable. Simiarly, setting to False ((A_baseline = all zero matrix))
              could only accurately measure the importance of existing edges.
  
          return (Numpy array): shape the same with A_val. Integrated gradients for the links.
          """
      node_idx = self.node_list.index(node_id)
  
      A_val = self.A
      total_gradients = np.zeros(A_val.shape)
      A_diff = (
          A_val
          if not non_exist_edge
          else (np.ones_like(A_val) - np.eye(A_val.shape[0]) - A_val)
      )
      for alpha in np.linspace(1.0 / steps, 1.0, steps):
          if self.is_sparse:
              A_val = sp.lil_matrix(A_val)
          tmp = super().get_link_masks(
              alpha, node_idx, class_of_interest, int(non_exist_edge)
          )
          if self.is_sparse:
              tmp = sp.csr_matrix(
                  (tmp, A_val.indices, A_val.indptr), shape=A_val.shape
              ).toarray()
          total_gradients += tmp
      return np.squeeze(np.multiply(total_gradients, A_diff) / steps, 0)
  
file_path: stellargraph/stellargraph/interpretability/saliency_maps/integrated_gradients_gat.py
imports: import numpy
  from .saliency_gat import GradientSaliencyGAT
  import scipy.sparse
  from tensorflow.keras import backend
label_desc: Use image node_id 3 for calling the IntegratedGradientsGAT obj's underlying member method code with example usage: obj.get_link_importance(node_id, class_of_interest, steps, non_exist_edge) and returns: np