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.

Can the node similarity algorithm calculate the similarity score based on incoming and outgoing relationships from a node?

hlow
Node Link

For example, let's say I have 3 nodes: Dan, Ann and Bob.

Dan LIKES Ann.
Bob LIKES Ann.
Ann LIKES Bob.

I think the algorithm would give Dan and Bob a score of 1 given that they both have outgoing LIKES relationship to Ann. But is there a way to take into consideration the incoming LIKES relationship from Ann to Bob, which would change the similarity score between Dan and Bob?

Thank you

1 ACCEPTED SOLUTION

Sure - you can load the graph as undirected and then we will compute similarity in both directions. Or you can load LIKES with both natural and reverse orientation (so as LIKES and LIKED_BY) if you want to compare.

Take a peak at our docs on relationship directionality, here: Creating graphs - Neo4j Graph Data Science

View solution in original post

1 REPLY 1

Sure - you can load the graph as undirected and then we will compute similarity in both directions. Or you can load LIKES with both natural and reverse orientation (so as LIKES and LIKED_BY) if you want to compare.

Take a peak at our docs on relationship directionality, here: Creating graphs - Neo4j Graph Data Science