class_docstr: Class to compute the saliency maps based on the vanilla gradient w.r.t the adjacency and the feature matrix.
  
  Args:
      model (Keras model object): The differentiable graph model object.
          model.input should contain two tensors:
              - features (Numpy array): The placeholder of the feature matrix.
              - adj (Numpy array): The placeholder of the adjacency matrix.
          model.output (Keras tensor): The tensor of model prediction output.
              This is typically the logit or softmax output.
class_docstr_tok: ["Class","to","compute","the","saliency","maps","based","on","the","vanilla","gradient","w.r.t","the","adjacency","and","the","feature","matrix",".","Args",":","model","(","Keras","model","object",")",":","The","differentiable","graph","model","object",".","model.input","should","contain","two","tensors",":","-","features","(","Numpy","array",")",":","The","placeholder","of","the","feature","matrix",".","-","adj","(","Numpy","array",")",":","The","placeholder","of","the","adjacency","matrix",".","model.output","(","Keras","tensor",")",":","The","tensor","of","model","prediction","output",".","This","is","typically","the","logit","or","softmax","output","."]
docstr: For nodes, the saliency mask we get gives us the importance of each features. For visualization purpose, we may
  want to see a summary of the importance for the node. The importance of each node can be defined as the sum of
  all the partial gradients w.r.t its features.
  
  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.
      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.
      X_val (Numpy array): The feature matrix, we do not directly get it from generator to support the integrated gradients computation.
      A_val (Numpy array): The adjacency matrix, we do not directly get it from generator to support the integrated gradients computation.        Returns:
docstr_tok: ["For","nodes",",","the","saliency","mask","we","get","gives","us","the","importance","of","each","features",".","For","visualization","purpose",",","we","may","want","to","see","a","summary","of","the","importance","for","the","node",".","The","importance","of","each","node","can","be","defined","as","the","sum","of","all","the","partial","gradients","w.r.t","its","features",".","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",".","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",".","X_val","(","Numpy","array",")",":","The","feature","matrix",",","we","do","not","directly","get","it","from","generator","to","support","the","integrated","gradients","computation",".","A_val","(","Numpy","array",")",":","The","adjacency","matrix",",","we","do","not","directly","get","it","from","generator","to","support","the","integrated","gradients","computation",".","Returns",":"]
code: def get_node_importance(
      self, node_id, class_of_interest, X_val=None, A_val=None
  ):
      """
      For nodes, the saliency mask we get gives us the importance of each features. For visualization purpose, we may
      want to see a summary of the importance for the node. The importance of each node can be defined as the sum of
      all the partial gradients w.r.t its features.
  
      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.
          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.
          X_val (Numpy array): The feature matrix, we do not directly get it from generator to support the integrated gradients computation.
          A_val (Numpy array): The adjacency matrix, we do not directly get it from generator to support the integrated gradients computation.        Returns:
      """
  
      if X_val is None:
          X_val = self.X
      if A_val is None:
          A_val = self.A
      gradients = self.get_node_masks(
          X_val, A_val, node_id, class_of_interest
      )[0]
      return np.sum(gradients, axis=1)
  
file_path: stellargraph/stellargraph/interpretability/saliency_maps/saliency_gat.py
imports: import numpy
  from tensorflow.keras import backend
  import scipy.sparse
  from stellargraph.mapper import FullBatchSequence
  import tensorflow
label_desc: Use image node_id 7 for calling the GradientSaliencyGAT obj's underlying member method code with example usage: obj.get_node_importance(node_id, class_of_interest, X_val, A_val) and returns: np