Learning about other characterizing metrics
The degree is not the only metric that can be computed to characterize a graph. Let’s look at a graph detail page on the Network Repository Project (for instance, https://networkrepository.com/socfb-UVA16.php). It contains data about the number of nodes, edges, degrees, and other metrics, such as the number of triangles and clustering coefficient.
In the rest of this section, we will provide definitions for some of the metrics listed in the preceding Figure 3.11. We will refer to this section in the next few chapters when we use graph-based metrics to build a machine learning model.
Triangle count
The name is self-explanatory, but a triangle is defined by three connected nodes. In a directed graph, edge orientation needs to be taken into account.
For a given node, n
, its triangle count is found by checking whether its neighbors are also connected to another neighbor of n
. Look at the following undirected graph: