Skip to content

Commit 453e50f

Browse files
committed
use the tc of the graph for reconstr calc
1 parent 09771ec commit 453e50f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

network/order_embeddings.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -513,18 +513,18 @@ def check_graph_embedding(self):
513513
if self.check_graph_embedding_neg_graph is None:
514514
start_time = time.time()
515515
# make negative graph
516-
n_nodes = len(list(self.G.nodes()))
516+
n_nodes = len(list(self.G_tc.nodes()))
517517

518518
A = np.ones((n_nodes, n_nodes), dtype=np.bool)
519519

520-
for u, v in list(self.G.edges()):
520+
for u, v in list(self.G_tc.edges()):
521521
# remove edges that are in G_train_tc
522522
A[u, v] = 0
523523
np.fill_diagonal(A, 0)
524524
self.check_graph_embedding_neg_graph = A
525525

526-
self.edges_in_G = self.G.edges()
527-
self.n_nodes_in_G = len(self.G.nodes())
526+
self.edges_in_G = self.G_tc.edges()
527+
self.n_nodes_in_G = len(self.G_tc.nodes())
528528
self.nodes_in_G = [i for i in range(self.n_nodes_in_G)]
529529

530530
self.pos_u_list, self.pos_v_list = [], []

0 commit comments

Comments
 (0)