Shallow embedding methods
As already introduced in Chapter 2, Graph Machine Learning, with shallow embedding methods, we identify a set of algorithms that are able to learn and return only the embedding values for the learned input data.
In this section, we will explore two main categories of these methods: matrix factorization-based approaches and skip-gram-based approaches. Matrix factorization methods decompose the adjacency matrix to capture latent patterns in the graph, while skip-gram methods, inspired by natural language processing, learn embeddings by predicting the likelihood of node co-occurrences. We will dive into these techniques in detail and provide Python examples for each, using libraries such as Graph Embedding Methods (GEM), Node to Vector (Node2Vec), and karateclub
.
Matrix factorization
Matrix factorization is a general decomposition technique widely used in different domains. The technique has become very popular, especially in the context of recommendation...