deepampatel / SimNode

Find similar nodes in graph using jaccard similarity. Use this to recommend similar dishes and restaurants

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SimNode: Using Graphs to do find Similar Entities/Nodes.

Finding similar restaurants on a small graph created from zomato restaurants data.

Create Graph

Using the neo4j-admin import

  1. Download data from here
  2. neo4j-admin import option requires the csv to be in a specific format to create nodes and relationships.
  3. The logic of creating these csv's can be found in this notebook
  4. Run the notebook and create required csv's
  5. Copy all the csv's to import folder of neo4j database
  6. Run the below command
sudo ./bin/neo4j-admin import --database zomato.db  --mode csv --ignore-missing-nodes --multiline-fields=True --ignore-duplicate-nodes --nodes:Location=import/locations.csv --nodes:Restaurant=import/restaurant.csv --nodes:Dish=import/dishes.csv --nodes:Type=import/type.csv --nodes:Cuisine=import/cuisine.csv --relationships:SERVES_CUISINE=import/cuisine_restaurant.csv --relationships:SERVES_DISH=import/restaurant_dish.csv --relationships:FALL_UNDER import/type_restaurant.csv --relationships:FAMOUS_FOR=import/liked_dishes_restaurant.csv --relationships:IN_AREA=import/restaurant_location.csv

TL;DR

Import graph using cypher-shell

cat zomato_food_graph.cypher | ./bin/cypher-shell -u neo4j -p password

About

Find similar nodes in graph using jaccard similarity. Use this to recommend similar dishes and restaurants


Languages

Language:Jupyter Notebook 100.0%