Automatically Extracting Features with Graph Embeddings for Machine Learning
When dealing with a graph dataset, we can rely on feature engineering and define important features for our context, taking into consideration the graph structure via features extracted from graph algorithms such as node importance or belonging to a community. However, as for other kinds of complex objects—images or texts, for instance—there are ways to automatically extract features from a graph. They are called graph embedding algorithms, and they are able to retain part of the graph structure while representing objects in a low-dimensional space. In this chapter, we will introduce several of these algorithms, which can be used from the Neo4j Graph Data Science (GDS) library: Node2Vec and GraphSAGE. On one hand, Node2Vec is inspired by the Word2Vec text embedding algorithm and only works when the full dataset is known beforehand, meaning we won’t be able to predict embeddings of new...