Skip to content

Commit 8d7b020

Browse files
authored
Merge pull request #187 from Michael1015198808/patch-1
Fix bugs in `Tutorial for GNN Explainability`
2 parents b54e27e + 7ed1646 commit 8d7b020

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/source/tutorials/subgraphx.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ Since the graph model is a two-layer GNN model, the information only aggregates
8282
from dig.xgraph.method.subgraphx import PlotUtils
8383
from dig.xgraph.method.subgraphx import MCTS
8484
from torch_geometric.utils import to_networkx
85+
from torch_geometric.data import Data
8586
8687
subgraph_x, subgraph_edge_index, subset, edge_mask, kwargs = \
8788
MCTS.__subgraph__(node_idx, data.x, data.edge_index, num_hops=2)
@@ -130,8 +131,7 @@ After MCTS searching and Shapley value computation, the subgraph with the highes
130131
result = find_closest_node_result(explanation_results[prediction], max_nodes=max_nodes)
131132
132133
plotutils = PlotUtils(dataset_name='ba_shapes')
133-
explainer.visualization(explanation_results,
134-
prediction,
134+
explainer.visualization(explanation_results[prediction],
135135
max_nodes=max_nodes,
136136
plot_utils=plotutils,
137137
y=data.y)

0 commit comments

Comments
 (0)