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.

GDS query doesn't show results

kashu94
Node Clone

I have a movies dataset, where Node Person - ACTED_IN -> Node Movie is a relation. Person has attributes like 'person_id', 'person_name'. Movie has attributes like 'movie_id', 'title', 'revenue', 'genres', 'budget'. Relationship ACTED_IN has attribute 'character'. A Person can be a director or an actor, so accordingly the edge will be either 'ACTED_IN' or 'DIRECTED_BY'. I'm assuming that there is one director per movie right now. I want to find the most important Person Nodes with the help of Neo4j's inbuilt graph data science library which have graph algorithms for centrality measures and etc. I would like to use a centrality measure but none of the examples help me. I'm very new to this, please help. I've tried this so far -

sc.pngsc1.png

2 ACCEPTED SOLUTIONS

Sorry for the delayed response, It worked when I did it this way. I'm attaching the function below.

sol.png

View solution in original post

You are projecting the Person and Movie nodes in this cypher projection.  You only projected the Person nodes in your original native projection. This may explain the uniform similarity values. 

You can update your original native projection to the same by replacing ‘Person’ with [‘Person’, ‘Movie’]. 

View solution in original post

4 REPLIES 4

Are all your nodes connected to just one other node? Can you share your graph?

I just created a test data set and executed your queries on it and I got data that was not uniformly 0.15. My date have a variety of paths.  I created a data set of just families of nodes with multiple children. I all scores of 0.15 for these nodes.

Sorry for the delayed response, It worked when I did it this way. I'm attaching the function below.

sol.png

You are projecting the Person and Movie nodes in this cypher projection.  You only projected the Person nodes in your original native projection. This may explain the uniform similarity values. 

You can update your original native projection to the same by replacing ‘Person’ with [‘Person’, ‘Movie’]. 

Yes, that's where I went wrong with. Thank you for all the help.

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online