torch_geometric.explain.metric.characterization_score

characterization_score(pos_fidelity: Tensor, neg_fidelity: Tensor, pos_weight: float = 0.5, neg_weight: float = 0.5) Tensor[source]

Returns the componentwise characterization score as described in the “GraphFramEx: Towards Systematic Evaluation of Explainability Methods for Graph Neural Networks” paper.

\[\textrm{charact} = \frac{w_{+} + w_{-}}{\frac{w_{+}}{\textrm{fid}_{+}} + \frac{w_{-}}{1 - \textrm{fid}_{-}}}\]
Parameters:
  • pos_fidelity (torch.Tensor) – The positive fidelity \(\textrm{fid}_{+}\).

  • neg_fidelity (torch.Tensor) – The negative fidelity \(\textrm{fid}_{-}\).

  • pos_weight (float, optional) – The weight \(w_{+}\) for \(\textrm{fid}_{+}\). (default: 0.5)

  • neg_weight (float, optional) – The weight \(w_{-}\) for \(\textrm{fid}_{-}\). (default: 0.5)