I am running the random walk algorithm on my graph with just 4 nodes and 8 edges as a test. When I don't specify the sourceNodes
parameter, everything is fine and I get walks from all the nodes. Here is my code:
CALL gds.beta.randomWalk.stream(
'example',
{
walkLength: 2,
walksPerNode: 1,
randomSeed: 42,
concurrency: 1
}
)
YIELD nodeIds, path
RETURN nodeIds, [node IN nodes(path) | node.name ] AS event_name
So far so good. But when I specify a source node at a particular node present in the projected graph, the query runs forever and doesn't terminate. Here is the query:
MATCH (n:IDHcodel:Molecular)
WHERE n.name IN ['9q34o3']
WITH COLLECT(n) as sourceNodes
CALL gds.beta.randomWalk.stream(
'example',
{
sourceNodes: sourceNodes,
walkLength: 2,
walksPerNode: 1,
randomSeed: 42,
concurrency: 1
}
)
YIELD nodeIds, path
RETURN nodeIds, [node IN nodes(path) | node.name ] AS event_name
I certainly made sure that the node is in the projected graph. Any help would be appreciated. Thanks.