15.08.2015 Views

Introduction to the Modeling and Analysis of Complex Systems

introduction-to-the-modeling-and-analysis-of-complex-systems-sayama-pdf

introduction-to-the-modeling-and-analysis-of-complex-systems-sayama-pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

382CHAPTER 17. DYNAMICAL NETWORKS II: ANALYSIS OF NETWORK TOPOLOGIESthat reach node i in t steps, with t taken <strong>to</strong> infinity. Eigenvec<strong>to</strong>r v is usuallychosen <strong>to</strong> be a non-negative unit vec<strong>to</strong>r (v i ≥ 0, |v| = 1).PageRankc P (i) = v i(i-th element <strong>of</strong> <strong>the</strong> dominant eigenvec<strong>to</strong>r v <strong>of</strong> <strong>the</strong>following transition probability matrix) (17.23)T = αAD −1 + (1 − α) J n(17.24)where A is <strong>the</strong> adjacency matrix <strong>of</strong> <strong>the</strong> network, D −1 is a diagonal matrix whosei-th diagonal component is 1/deg(i), J is an n × n all-one matrix, <strong>and</strong> α is <strong>the</strong>damping parameter (α = 0.85 is commonly used by default).PageRank is a variation <strong>of</strong> eigenvec<strong>to</strong>r centrality that was originally developedby Larry Page <strong>and</strong> Sergey Brin, <strong>the</strong> founders <strong>of</strong> Google, in <strong>the</strong> late 1990s [74,75] <strong>to</strong> rank web pages. PageRank measures <strong>the</strong> asymp<strong>to</strong>tic probability for ar<strong>and</strong>om walker on <strong>the</strong> network <strong>to</strong> be st<strong>and</strong>ing on node i, assuming that <strong>the</strong>walker moves <strong>to</strong> a r<strong>and</strong>omly chosen neighbor with probability α, or jumps <strong>to</strong>any node in <strong>the</strong> network with probability 1 − α, in each time step. Eigenvec<strong>to</strong>r vis usually chosen <strong>to</strong> be a probability distribution, i.e., ∑ i v i = 1.Note that all <strong>of</strong> <strong>the</strong>se centrality measures give a normalized value between 0 <strong>and</strong> 1,where 1 means perfectly central while 0 means completely peripheral. In most cases, <strong>the</strong>values are somewhere in between. Functions <strong>to</strong> calculate <strong>the</strong>se centrality measures arealso available in NetworkX (outputs are omitted in <strong>the</strong> code below <strong>to</strong> save space):Code 17.9:>>> import networkx as nx>>> g = nx.karate_club_graph()>>> nx.degree_centrality(g)>>> nx.betweenness_centrality(g)>>> nx.closeness_centrality(g)>>> nx.eigenvec<strong>to</strong>r_centrality(g)>>> nx.pagerank(g)While those centrality measures are <strong>of</strong>ten correlated, <strong>the</strong>y capture different properties<strong>of</strong> each node. Which centrality should be used depends on <strong>the</strong> problem you are addressing.For example, if you just want <strong>to</strong> find <strong>the</strong> most popular person in a social network,you can just use degree centrality. But if you want <strong>to</strong> find <strong>the</strong> most efficient person <strong>to</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!