Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hands-On Graph Neural Networks Using Python

You're reading from  Hands-On Graph Neural Networks Using Python

Product type Book
Published in Apr 2023
Publisher Packt
ISBN-13 9781804617526
Pages 354 pages
Edition 1st Edition
Languages
Author (1):
Maxime Labonne Maxime Labonne
Profile icon Maxime Labonne

Table of Contents (25) Chapters

Preface Part 1: Introduction to Graph Learning
Chapter 1: Getting Started with Graph Learning Chapter 2: Graph Theory for Graph Neural Networks Chapter 3: Creating Node Representations with DeepWalk Part 2: Fundamentals
Chapter 4: Improving Embeddings with Biased Random Walks in Node2Vec Chapter 5: Including Node Features with Vanilla Neural Networks Chapter 6: Introducing Graph Convolutional Networks Chapter 7: Graph Attention Networks Part 3: Advanced Techniques
Chapter 8: Scaling Up Graph Neural Networks with GraphSAGE Chapter 9: Defining Expressiveness for Graph Classification Chapter 10: Predicting Links with Graph Neural Networks Chapter 11: Generating Graphs Using Graph Neural Networks Chapter 12: Learning from Heterogeneous Graphs Chapter 13: Temporal Graph Neural Networks Chapter 14: Explaining Graph Neural Networks Part 4: Applications
Chapter 15: Forecasting Traffic Using A3T-GCN Chapter 16: Detecting Anomalies Using Heterogeneous GNNs Chapter 17: Building a Recommender System Using LightGCN Chapter 18: Unlocking the Potential of Graph Neural Networks for Real-World Applications
Index Other Books You May Enjoy

Building a movie RecSys

One of the most popular applications of GNNs is RecSys. If you think about the foundation of Word2Vec (and, thus, DeepWalk and Node2Vec), the goal is to produce vectors with the ability to measure their similarity. Encode movies instead of words, and you can suddenly ask for movies that are the most similar to a given input title. It sounds a lot like a RecSys, right?

But how to encode movies? We want to create (biased) random walks of movies, but this requires a graph dataset where similar movies are connected to each other. This is not easy to find.

Another approach is to look at user ratings. There are different techniques to build a graph based on ratings: bipartite graphs, edges based on pointwise mutual information, and so on. In this section, we’ll implement a simple and intuitive approach: movies that are liked by the same users are connected. We’ll then use this graph to learn movie embeddings using Node2Vec:

  1. First, let&...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}