Building a graph

In the next step, we will build a graph of the most frequent bigrams. To build the graph, we need to know what it means.

The graph originates from the basic mathematical graph theory, where a graph is essentially a group of objects, called nodes or vertices, where certain pairs of nodes are related to each other. Diagrammatically, a graph is represented as follows, where the dots represent a Node and the relationship by the lines is known as an Edge.

Now, coming back to Pinterest, the relationship between concepts is defined as a co-occurrence in a Pin description. It means that if data science appears together with machine ...

Get Python Social Media Analytics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.