You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def walk(args):
walk_length, start, schema = args
# Simulate a random walk starting from start node.
rand = random.Random()
if schema:
schema_items = schema.split('-')
assert schema_items[0] == schema_items[-1]
walk = [start]
while len(walk) < walk_length:
cur = walk[-1]
candidates = []
for node in G[cur]:
if schema == '' or node_type[node] == schema_items[len(walk) % (len(schema_items) - 1)]:
candidates.append(node)
if candidates:
walk.append(rand.choice(candidates))
else:
break
return [str(node) for node in walk]
The walk doesn't consider edge types which is required in the paper's section 4.3 description.
To be specific, given a view r of the network
The text was updated successfully, but these errors were encountered:
Actually I have the same opinion with you, schema based random walk sample walks on one specific layer, which means relation type is fixed when sample one random walk sequence.
In the walk function:
The walk doesn't consider edge types which is required in the paper's section 4.3 description.
The text was updated successfully, but these errors were encountered: