Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ggcm method as example #8186

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
fix function name
  • Loading branch information
xYix committed Oct 13, 2023
commit f57e2dff4ec3ff7ae8b3c5e0c6e7c6b60aac0a0b
4 changes: 2 additions & 2 deletions examples/ggcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
avg_edge_num += 1


def inver_graph_convolution(neg_graph: Tensor):
def inverse_graph_convolution(neg_graph: Tensor):
change_num = args.change_num # interchange edges for how many times
if neg_graph is None:
regular_graph = networkx.random_regular_graph(d=avg_edge_num,
Expand Down Expand Up @@ -110,7 +110,7 @@ def ggcm(degree: int, alpha: float, decline: float,
embedds = torch.sparse.mm(lazy_adj, U)

# inverse graph convlution (IGC), lazy version
neg_adj_nor, neg_graph = inver_graph_convolution(neg_graph)
neg_adj_nor, neg_graph = inverse_graph_convolution(neg_graph)
inv_lazy_adj = lazy_random_walk(neg_adj_nor, neg_beta)
inv_embedds = torch.sparse.mm(inv_lazy_adj, U)

Expand Down