Problem Description
Learn how to complete a knowledge graph of a social network.
We'll cover the following
Social network
When you log in to Facebook or any other social networking website, you see a set of recommendations of people you may know. On the backend, the site uses different algorithms to send the most accurate recommendations based on previous connections.
In this case study, we try to simulate a case in which we can learn the network structure and push out recommendations to different people on the social network.
For starters, a social network graph is a graph where the nodes represent people, and the edges represent the social connection between different people, such as family, friends, colleagues, acquaintances, etc. Social networks hold rich information about interpersonal connections in society.
Let's start a case study on a social network. Our objective is to take a social network graph and try to retrieve information from it. We make use of the following Python libraries:
NetworkX
pykeen
faker
pandas
matplotlib
fandom
The dataset
Many open-source social network graphs are publicly available, but we construct a synthetic graph using the NetworkX
library because it allows us better control over different aspects of the graph.
Watts–Strogatz model
We can generate synthetic graphs using Watts–Strogatz model, which is a random graph generation model. It's the simplest model that can simulate a real-world social network as closely as possible. Let's see how we can use this model to generate a social network.
Get hands-on with 1400+ tech skills courses.