To understand the structure of a network, it is often useful to identify which nodes play the most important roles or are best placed within the network, and to quantify how central they are. Centrality measures and other graph metrics are often used as features used to train Machine Learning models.
In this post we explore some of the fundamental centrality measures we may use to characterize the relative importance of a node in the network: Degree Centrality, Closeness Centrality and Betweenness Centrality.
In other to better illustrate the properties of each type of centrality, we start by creating a simple barbell-like network, with two Erdős–Rényi networks connected by a single node:




