cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

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?

1 ACCEPTED SOLUTION

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 Native projection - Neo4j Graph Data Science for more information

View solution in original post

2 REPLIES 2

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 Native projection - Neo4j Graph Data Science for more information

Thanks, @alicia.frame1! This solved my problem.