Computing centrality
Centrality comes in a number of different forms because importance often depends
on different factors. The important elements of a graph when analyzing tweets
will differ from the important elements when analyzing traffic flow. Fortunately,
NetworkX provides you with a number of methods for calculating centrality. For
example, you can calculate centrality based on node degrees. The following code
uses the modified graph from the previous section of the chapter. (You can find
this code in the
A4D; 08; Graph Centrality.ipynb
file.)
Do'stlaringiz bilan baham: |