I’ve looked upon this article to learn about node similarity Node Similarity - Neo4j Graph Data Science
It calculates similarity of Person to Person based on their shared Instruments. I would like to ask:
-
How does it know whether to find Person to Person similarity based on shared Instruments? From what I know it could be Instrument to Instrument similarity based on shared Person also?
-
If I have another data model where
User RATED Movie. In which the rated relationship has property rating
Movie IN_GENRE Genres. In which the IN_GENRE relationship has property weight set to 1
User INTERESTED_IN Genres. In which the INTERESTED_IN relationship has property avg_rating (the average ratings of all movies within this genre)
How do I find User to Movie similarity based on shared Genre nodes with cosine similarity?
I want the User vector to be the avg_rating of each genre and the Movie vector to be a vector containing 0 or 1 (1 if Movie has relationship to that Genre, 0 if not)
So let’s say if we have Genre A B C, the User vector would be [2.5, 1.0, 3] and Movie vector would be [1, 0, 1]
From what I learnt in the article it just calculates Node within same Label. How to calculate similarity between different labels, as specified? Thank you