liveBook · Manning

What you will learn in Graph Algorithms for Data Science

With examples in Neo4j

by Tomaz Bratanic

Chapter by chapter

Chapter 1: Graphs and network science: An introduction

1.1 Understanding data through relationships · 1.2 How to spot a graph-shaped problem · 1.2.1 Self-referencing relationships · 1.2.2 Pathfinding networks · 1.2.3 Bipartite graphs · 1.2.4 Complex networks · 1.3 Summary

What you learn in chapter 1 →

Chapter 2: Representing network structure: Designing your first graph model

2.1 Graph terminology · 2.1.1 Directed vs. undirected graph · 2.1.2 Weighted vs. unweighted graphs · 2.1.3 Bipartite vs. monopartite graphs · 2.1.4 Multigraph vs. simple graph · 2.1.5 A complete graph · 2.2 Network representations · 2.2.1 Labeled-property graph model · 2.3 Designing your first labeled-property graph model · 2.3.1 Follower network · 2.3.2 User-tweet network · 2.3.3 Retweet network · 2.3.4 Representing graph schema · 2.4 Extracting knowledge from text · 2.4.1 Links · 2.4.2 Hashtags · 2.4.3 Mentions · 2.4.4 Final Twitter social network schema · 2.5 Summary

What you learn in chapter 2 →

Chapter 3: Your first steps with Cypher query language

3.1 Cypher query language clauses · 3.1.1 CREATE clause · 3.1.2 MATCH clause · 3.1.3 WITH clause · 3.1.4 SET clause · 3.1.5 REMOVE clause · 3.1.6 DELETE clause · 3.1.7 MERGE clause · 3.2 Importing CSV files with Cypher · 3.2.1 Clean up the database · 3.2.2 Twitter graph model · 3.2.3 Unique constraints · 3.2.4 LOAD CSV clause · 3.2.5 Importing the Twitter social network · 3.3 Solutions to exercises · 3.4 Summary

What you learn in chapter 3 →

Chapter 4: Exploratory graph analysis

4.1 Exploring the Twitter network · 4.2 Aggregating data with Cypher query language · 4.2.1 Time aggregations · 4.3 Filtering graph patterns · 4.4 Counting subqueries · 4.5 Multiple aggregations in sequence · 4.6 Solutions to exercises · 4.7 Summary

What you learn in chapter 4 →

Chapter 5: Introduction to social network analysis

5.1 Follower network · 5.1.1 Node degree distribution · 5.2 Introduction to the Neo4j Graph Data Science library · 5.2.1 Graph catalog and native projection · 5.3 Network characterization · 5.3.1 Weakly connected component algorithm · 5.3.2 Strongly connected components algorithm · 5.3.3 Local clustering coefficient · 5.4 Identifying central nodes · 5.4.1 PageRank algorithm · 5.4.2 Personalized PageRank algorithm · 5.4.3 Dropping the named graph · 5.5 Solutions to exercises · 5.6 Summary

What you learn in chapter 5 →

Chapter 6: Projecting monopartite networks

6.1 Translating an indirect multihop path into a direct relationship · 6.1.1 Cypher projection · 6.2 Retweet network characterization · 6.2.1 Degree centrality · 6.2.2 Weakly connected components · 6.3 Identifying the most influential content creators · 6.3.1 Excluding self-loops · 6.3.2 Weighted PageRank variant · 6.3.3 Dropping the projected in-memory graph · 6.4 Solutions to exercises · 6.5 Summary

What you learn in chapter 6 →

Chapter 7: Inferring co-occurrence networks based on bipartite networks

7.1 Extracting hashtags from tweets · 7.2 Constructing the co-occurrence network · 7.2.1 Jaccard similarity coefficient · 7.2.2 Node similarity algorithm · 7.3 Characterization of the co-occurrence network · 7.3.1 Node degree centrality · 7.3.2 Weakly connected components · 7.4 Community detection with the label propagation algorithm · 7.5 Identifying community representatives with PageRank · 7.5.1 Dropping the projected in-memory graphs · 7.6 Solutions to exercises · 7.7 Summary

What you learn in chapter 7 →

Chapter 8: Constructing a nearest neighbor similarity network

8.1 Feature extraction · 8.1.1 Motifs and graphlets · 8.1.2 Betweenness centrality · 8.1.3 Closeness centrality · 8.2 Constructing the nearest neighbor graph · 8.2.1 Evaluating features · 8.2.2 Inferring the similarity network · 8.3 User segmentation with the community detection algorithm · 8.4 Solutions to exercises · 8.5 Summary

What you learn in chapter 8 →

Chapter 9: Node embeddings and classification

9.1 Node embedding models · 9.1.1 Homophily vs. structural roles approach · 9.1.2 Inductive vs. transductive embedding models · 9.2 Node classification task · 9.2.1 Defining a connection to a Neo4j database · 9.2.2 Importing a Twitch dataset · 9.3 The node2vec algorithm · 9.3.1 The word2vec algorithm · 9.3.2 Random walks · 9.3.3 Calculate node2vec embeddings · 9.3.4 Evaluating node embeddings · 9.3.5 Training a classification model · 9.3.6 Evaluating predictions · 9.4 Solutions to exercises · 9.5 Summary

What you learn in chapter 9 →

Chapter 10: Link prediction

10.1 Link prediction workflow · 10.2 Dataset split · 10.2.1 Time-based split · 10.2.2 Random split · 10.2.3 Negative samples · 10.3 Network feature engineering · 10.3.1 Network distance · 10.3.2 Preferential attachment · 10.3.3 Common neighbors · 10.3.4 Adamic-Adar index · 10.3.5 Clustering coefficient of common neighbors · 10.4 Link prediction classification model · 10.4.1 Missing values · 10.4.2 Training the model · 10.4.3 Evaluating the model · 10.5 Solutions to exercises · 10.6 Summary

What you learn in chapter 10 →

Chapter 11: Knowledge graph completion

11.1 Knowledge graph embedding model · 11.1.1 Triple · 11.1.2 TransE · 11.1.3 TransE limitations · 11.2 Knowledge graph completion · 11.2.1 Hetionet · 11.2.2 Dataset split · 11.2.3 Train a PairRE model · 11.2.4 Drug application predictions · 11.2.5 Explaining predictions · 11.3 Solutions to exercises · 11.4 Summary

What you learn in chapter 11 →

Chapter 12: Constructing a graph using natural language processing techniques

12.1 Coreference resolution · 12.2 Named entity recognition · 12.2.1 Entity linking · 12.3 Relation extraction · 12.4 Implementation of information extraction pipeline · 12.4.1 SpaCy · 12.4.2 Corefence resolution · 12.4.3 End-to-end relation extraction · 12.4.4 Entity linking · 12.4.5 External data enrichment · 12.5 Solutions to exercises · 12.6 Summary

What you learn in chapter 12 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.