Using incoming relationships in node similarity

Hi all,
The node similarity algo (from GDS) considers all the outgoing relationships from a node and computes similarities on the basis of the same.
Can we somehow consider both incoming and outgoing relationships while using the node similarity?

You could load your data in both directions - NATURAL and REVERSE , so although NodeSimilarity uses outgoing relationships to define the source and target nodes (source nodes are measured for similarity to each other based on target nodes), you can duplicate the relationships to cover both directions.

See https://neo4j.com/docs/graph-data-science/current/management-ops/native-projection/#native-projection-syntax-projection-orientation for more information :slight_smile:

2 Likes

Thanks, @alicia_frame1! This solved my problem.