Degree

Learn about the degree metric, its variations between network types, and how to calculate it using Python.

Degree

The most simple centrality measure is called a degree. The “degree” of a node is a measurement of how many other nodes are connected to it. A high-degree node is connected to a lot of other nodes, and, in some cases, this can mean that this node is important in some way.

The degree is also the measure we use to find hubs in the network. Hubs are nodes with enormous degree values, which is a characteristic of scale-free networks and can also happen on small-world networks.

Let’s learn how to calculate the degree of a node.

Usually, when doing mathematical calculations, it’s better to use the adjacency matrix representation of the network, so we’ll use it a lot.

LetAAbe the adjacency matrix of a networkGGwithnnnodes. Then, the degree of a node D(i)D(i) can be calculated as:

Get hands-on with 1400+ tech skills courses.