Centrality of a vertex

The centrality of a vertex in a graph defines the importance of that vertex in the graph. Centrality can be calculated in a multitude of ways. Degree centrality is calculated based on the in-degree--the number of incoming edges--and the out-degree--the number of outgoing edges of the graph.

Let's look at the code to find the degree centrality:

> degrees <- degree(usairport, loops = FALSE)
> head(sort(degrees, decreasing = TRUE),10)
0 1 2 6 5 17 7 20 10 9
145 136 132 130 122 114 114 110 109 98

In the preceding case, we use the degree function to find the degree centrality score. We have sorted it in descending order. Airport 0 has the highest centrality score. In this case, we have used both the in-degree and the out-degree. According to this analysis, airport 0 must be some important node in this network.

Nodes with a large out-degree are considered central, as they act as a source for a lot of nodes. A node with a large in-degree is considered prestigious.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset