Recommendation Engine With Neo4j
Algorithm Types
-
- An algorithm that considers users interactions with products, with the assumption that other users will behave in similar ways.
-
- An algorithm that considers similarities between products and categories of products
Using Data Relationships for Recommendations
- Recommend items based on what users have liked in the past
- Predict what users like based on the similarity of their behaviors, activities and preference to others
Collaborative Filtering
In Cypher
MATCH (will:Person {name:"Will"})-[:PURCHASED]->(b:Book)<-[:PURCHASED]-(o:Person) MATCH (o)-[:PURHCASED]->(rec:BooK) WHERE NOT exists((will)-[:PURCHASED]->(rec)) RETURN rec
Basic initial approach. Improvements:
- aggregate across all purchases
- scoring / normalize
- compute similarity metrics
Content Filtering
In Cypher
MATCH (will:Person {name:"Will})-[:PURCHASED]->(b:Book)<-[:HAS_TAG]-(t:Tag) MATCH (t)<-[:HAS_TAG]-(other:Book) WHERE NOT exists((will)-[:PURCHASED]->(other)) RETURN other