Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. # Recommendation Engine With Neo4j {{tag>recommendation neo4j}} Algorithm Types - [[Collaborative Filtering]] - An algorithm that considers users interactions with products, with the assumption that other users will behave in similar ways. - [[Content Based Filtering]] - An algorithm that considers similarities between products and categories of products ## Using Data Relationships for Recommendations [[Content based filtering]] - Recommend items based on what users have liked in the past [[Collaborative filtering]] - Predict what users like based on the similarity of their behaviors, activities and preference to others ### Collaborative Filtering {{ https://i.imgur.com/ntVbKMN.jpg }} In Cypher <code> MATCH (will:Person {name:"Will"})-[:PURCHASED]->(b:Book)<-[:PURCHASED]-(o:Person) MATCH (o)-[:PURHCASED]->(rec:BooK) WHERE NOT exists((will)-[:PURCHASED]->(rec)) RETURN rec </code> Basic initial approach. Improvements: - aggregate across all purchases - scoring / normalize - compute similarity metrics ### Content Filtering {{ https://i.imgur.com/YD1eWbb.jpg }} In Cypher <code> 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 </code> #### Content Filtering - Concept Hierarchy {{ https://i.imgur.com/qZ3NPrh.jpg }} {{ https://i.imgur.com/qKEer5c.jpg }} ## Ref - https://www.youtube.com/watch?v=wbI5JwIFYEM - https://bit.ly/neo4josconslides - https://bit.ly/neo4jnotebook open/recommendation-engine-with-neo4j.txt Last modified: 2024/10/05 06:15by 127.0.0.1