Add "direction" possibilities to Link Prediction algorithms [GDS]

Hello :slight_smile:

I know Link Prediction algorithms are still in alpha but could you add to the documentation the different possibilities for the "direction" parameter?


Hi @Cobra

Thanks for raising this, I've passed this on and will be sorted.



Hello @Cobra!

There are many issues currently with the Link Prediction functions in the GDS library. We don't want to address all of them immediately (because we're busy with other topics) and as such it feels difficult to address just this one concern. Thus we will leave the docs unchanged, for now.

However, I can tell you that the direction parameter supports three values:

  • Outgoing
  • Incoming
  • Both

These are the equivalents of a Cypher MATCH pattern, respectively:

  • MATCH (n)-->(m)
  • MATCH (n)<--(m)
  • MATCH (n)--(m)

Since the Link Prediction functions effectively will do a traversal between two input nodes, the operation is directly comparable to a Cypher MATCH. There are a few syntactic sugars you can use as well, which are visible in the source code.

I hope this helps!
All the best

1 Like