Skip to content

Commit

Permalink
fix error in struc2vec
Browse files Browse the repository at this point in the history
  • Loading branch information
cc7738@kit.edu committed Mar 15, 2024
1 parent ebd33bc commit 88564b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/Embedding/ge/models/struc2vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
from ..walker import BiasedWalker
from pathlib import Path


class Struc2Vec():
def __init__(self,
graph,
Expand Down Expand Up @@ -152,7 +153,7 @@ def _compute_ordered_degreelist(self, max_num_layers):

degreeList = {}
vertices = self.idx # self.g.nodes()
for v in vertices:
for v in tqdm(vertices):
degreeList[v] = self._get_order_degreelist_node(v, max_num_layers)
return degreeList

Expand Down Expand Up @@ -224,7 +225,7 @@ def _compute_structural_distance(self, max_num_layers, workers=1, verbose=0,):
degreeListsSelected = {}
vertices = {}
n_nodes = len(self.idx)
for v in self.idx: # c:list of vertex
for v in tqdm(self.idx): # c:list of vertex
nbs = get_vertices(
v, len(self.graph[self.idx2node[v]]), degrees, n_nodes)
vertices[v] = nbs # store nbs
Expand Down

0 comments on commit 88564b3

Please # to comment.