Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-27-2022 06:07 AM
Hey,
I accessed the guide on https://guides.neo4j.com/sandbox/recommendations and found a way to get similair users to myself.
The full query is:
MATCH (p1:User {id:"220"})-[x:RATED]->(movie:Movie)
WITH p1, gds.alpha.similarity.asVector(movie, x.rating) AS p1Vector
MATCH (p2:User)-[x2:RATED]->(movie:Movie) WHERE p2 <> p1
WITH p1, p2, p1Vector, gds.alpha.similarity.asVector(movie, x2.rating) AS p2Vector
WHERE size(apoc.coll.intersection([v in p1Vector | v.category], [v in p2Vector | v.category])) > 10
RETURN p1.name AS from,
p2.name AS to,
gds.alpha.similarity.pearson(p1Vector, p2Vector, {vectorType: "maps"}) AS similarity
ORDER BY similarity DESC
LIMIT 100
When I test the code in Neo4j Aura I get an error Unknown function 'gds.alpha.similarity.asVector'. I visited the docs and found that there is a new version so I tried to use gds.similarity.asVector instead but I get the same type of error. Am I missing some sort of import or is this not the correct way to use the function?
09-27-2022 06:18 AM
AuraDB does not have the GDS library.
All the sessions of the conference are now available online