-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Graph Data Modeling in Python
By :

Now that we have our data in a Python graph, let’s go one step further and design a more robust recommendation process, typically carried out with graph data.
Let’s take on the role of a solutions engineer or data scientist and write a game recommendation system based on our Steam data. Recommendation systems are used heavily in customer-facing applications, to show the user a product that they may be interested in. Product recommendations are often based on what behaviorally similar users have played and purchased.
This time, we will write a set of reusable, generic methods to create an igraph graph from columns in a MySQL table. The functions will be designed to create a heterogeneous, bipartite, directed graph, given a set of column names.
Let’s start by writing a main function, mysql_to_graph()
. The method will need to accept a MySQL table name, the table
, source
, and target
column names...