SlideShare a Scribd company logo
Anˆlush DiktÔwn 
me to NetworkX thc Python 
Mwus c A. MpountourÐdhc 
Tm ma Majhmatik¸n PanepisthmÐou Pˆtrac 
mboudour@upatras.gr 
22 NoembrÐou 2012 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
PÐnakac Perieqomènwn 
1 Python kai NetworkX 
2 Eisagwg  Grˆfwn 
Mh Kateujunìmenoi Grˆfoi 
Kateujunìmenoi Grˆfoi 
Grˆfoi me Bˆrh Akm¸n 
DimereÐc Grˆfoi 
Qarakthristikˆ (Attributes) Kìmbwn kai Akm¸n 
TÔpoi Grˆfwn kai Sqesiak¸n Dedomènwn 
Genn torec Prokataskeuasmènwn Grˆfwn 
3 Diktuakˆ Mètra 
BajmoÐ Kìmbwn 
Kentrikìthtec Kìmbwn 
Suntelest c Suss¸reushc kai Metabatikìthta 
Amoibaiìthta 
Apostˆseic 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
4 DiktuakoÐ DiamerismoÐ 
Sunist¸sec kai KlÐkec 
k–Pur nec (k–Cores) 
Blockmodeling 
Koinìthtec (Communities) 
5 Diktuakˆ Montèla 
Anameiximìthta (Assortativity) 
Epirro  kai Diˆqush 
DÐktua Mikr¸n Kìsmwn (Small–Worlds) 
DÐktua QwrÐc KlÐmaka (Scale–Free) 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Python kai NetworkX 
H Python eÐnai mia ermhneutik  gl¸ssa, dhlad , 
ekteleÐtai qwrÐc na qreiˆzetai na perˆsei apì thn 
diadikasÐa thc sÔntaxhc. 
H Python diatÐjetai gia katèbasma (mazÐ me odhgÐec 
egkatˆstashc) gia ìla ta leitourgikˆ sust mata 
apì to http://www.python.org/download/. IdiaÐtera 
gia ta Windows sunistˆtai h ActivePython. 
To NetworkX eÐnai èna pakèto thc Python gia thn 
dhmiourgÐa kai ton qeirismì grˆfwn kai diktÔwn. 
To pakèto, h tekmhrÐwsh ki ˆlloi pìroi tou 
NetworkX eÐnai diajèsimoi sto 
http://networkx.lanl.gov/, ìpwc kai sthn apoj kh 
pakètwn thc Python PyPI. 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Mia apeujeÐac (one–click) egkatˆstash thc Python, 
tou NetworkX ki ˆllwn monˆdwn thc Python mporeÐ 
na gÐnei apì thn dianom  thc Python Enthought, 
pou dÐnetai dwreˆn gia akadhmaðk  qr sh. 
Pollèc qr simec plhroforÐec gia thn egkatˆstash 
twn Python, NetworkX ki ˆllwn aparaÐthtwn 
upologistik¸n pìrwn dÐnontai sth selÐda twn 
Resources tou maj matoc Comp 200 tou 
PanepisthmÐou tou Rice. 
'Oloi oi k¸dikec twn diafanei¸n ed¸ èqoun 
dokimasjeÐ pˆnw sthn èkdosh 2.7.3 thc Python kai 
thn èkdosh 1.7 tou NetworkX. 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Sto prooÐmio thc graf c (script) ìlwn twn 
ekteloÔmenwn ed¸ kwdÐkwn thc Python ja prèpei 
na eisˆgontai oi ex c grammèc: 
import networkx as nx 
import matplotlib . pyplot as plt 
import pylab 
Sthn antigraf  ki epikìllhsh twn entol¸n pou 
dÐnontai sth sunèqeia prèpei na proseqjeÐ h 
stoÐqish stic allagèc gramm¸n, giatÐ h Python 
eÐnai euaÐsjhth wc proc thn autìmath topojèthsh 
esoq¸n (indentation). 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Eisagwg  Grˆfwn 
Pr¸ta, dÐnontai oi entolèc gia mh kateujunìmenouc 
grˆfouc. 
Arqikˆ, dhmiourgeÐtai ènac kenìc grˆfoc: 
G = nx. Graph () 
Metˆ, eisˆgontai arqikˆ oi kìmboi, p.q., oi 5 
kìmboi '1', '2', '3', '4' kai '5' mpaÐnoun wc ex c: 
G. add_nodes_from ([1,2,3,4,5]) 
Bèbaia, antÐ gia arijmoÔc, oi kìmboi mporoÔn na 
eisˆgontai wc onìmata   lèxeic, p.q.: 
G. add_nodes_from ([ 'John ', 'Mary ']) 
G. add_node (" London ") 
G. add_nodes_from ([ 'a','b','c','d','e']) 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Tèloc, eisˆgontai oi akmèc, p.q., gia touc 5 
kìmbouc 1–5 na 6 sundèseic: 
G. add_edges_from ([(1,2),(1,4),(2,3),(3,4),(3,5),(4,5 )]) 
Oi lÐstec kai to pl joc twn eisaqjèntwn kìmbwn 
kai akm¸n dÐnontai apì tic entolèc: 
G. nodes () 
G. number_of_nodes () 
G. edges () 
G. number_of_edges () 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Gia to sqediasmì tou eisaqjèntoc grˆfou, p.q, 
tou paradeÐgmatoc autoÔ tou grˆfou me 5 
kìmbouc kai 6 akmèc, ekteloÔntai oi entolèc: 
plt . figure () 
nx. draw (G) 
plt . show ( block = False ) 
H teleutaÐa entol  dèqetai diˆforec paramètrouc, 
ìpwc, p.q., gia diaforetikì tÔpo sqedÐou (layout), 
mègejoc kai qr¸ma kìmbwn kai afaÐresh twn 
onomˆtwn (ids) twn kìmbwn: 
nx. draw_spring (G, node_size =100 , node_color ='# A0CBE2 ', 
with_labels = False ) 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
ParaleÐpontac parametropoi seic, o sqediasmìc 
tou grˆfou tou paradeÐgmatoc dÐnei to sq ma: 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Oi kìmboi mporoÔn na topotethjoÔn se stajerèc jèseic, 
efìson o grˆfoc eÐqe eisaqjeÐ me tic suntetagmènec 
touc, pou mporeÐ na gÐnei, p.q., sto parˆdeigma autì 
wc ex c: 
pos ={1:(0,0),2:(1,0),4:(0,1),3:(1,1),5:(0.5,2.0)} 
nx. draw (G, pos ) 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Eisagwg  Kateujunìmenwn Grˆfwn 
GÐnetai wc ex c, p.q., sto parˆdeigma autì: 
G=nx. DiGraph () 
G. add_nodes_from (["A","B","C","D"]) 
G. add_edges_from ([( "A","B"), ("C","A"), ("C","B"), 
("B","D")]) 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Eisagwg  Grˆfwn me Bˆrh Akm¸n 
GÐnetai, p.q., sto parˆdeigma autì me tic entolèc: 
G=nx. Graph () 
G. add_weighted_edges_from ([( 'a','b',4),( 'a','c',8), 
('a','d',5),( 'c','d',3)]) 
kai o sqediasmìc wc ex c: 
pos =nx. spring_layout (G) 
edge_labels = dict ([((u,v ,),d['weight ']) 
for u,v,d in G. edges ( data = True )]) 
nx. draw_networkx_nodes (G,pos , node_size = 700) 
nx. draw_networkx_edges (G, pos) 
nx. draw_networkx_labels (G,pos , font_size =20) 
nx. draw_networkx_edge_labels (G,pos , 
edge_labels = edge_labels , font_size =20) 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
AntÐ thc parˆjeshc twn tim¸n twn bar¸n, oi akmèc mporoÔn na 
sqediasjoÔn me eÔrh anˆloga twn tim¸n twn bar¸n wc ex c: 
nx. draw_networkx_nodes (G,pos , node_size = 700) 
edgewidth =[] 
for (u,v,d) in G. edges ( data = True ): 
edgewidth . append (d['weight ']) 
nx. draw_networkx_edges (G,pos , edge_color ='b', 
width = edgewidth ) 
nx. draw_networkx_labels (G,pos , font_size =20) 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Epiplèon, mporoÔn na krathjoÔn sto sqèdio mìno oi akmèc me bˆrh 
megalÔtera kˆpoiac endiˆmeshc tim c, p.q., 4: 
elarge = [(u,v) for (u,v,d) in G. edges ( data = True ) 
if d['weight '] >4] 
esmall = [(u,v) for (u,v,d) in G. edges ( data = True ) 
if d['weight '] <=4] 
nx. draw_networkx_edges (G,pos , edgelist = elarge , 
edge_color ='b',width = edgewidth ) 
nx. draw_networkx_edges (G,pos , edgelist = esmall , width =6, 
alpha =0.5, edge_color ='g',style ='dashed ') 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Eisagwg  Dimer¸n Grˆfwn 
H eisagwg  dimer¸n grˆfwn gÐnetai ìpwc, p.q., 
sto parakˆtw parˆdeigma: 
from networkx . algorithms import bipartite 
G = nx. Graph () 
G. add_nodes_from ([1,2,3,4], bipartite =0) 
G. add_nodes_from ([ 'a','b','c'], bipartite =1) 
G. add_edges_from ([(1,'a'),(1,'b'),(2,'a'),(2,'b'), 
(2,'c'),(3,'c'),(4,'b'),(4,'c')]) 
pos ={1:(0,0), 
2:(0,1), 
3:(0,2), 
4:(0,3), 
'a':(1,0.5), 
'b':(1,1.5), 
'c':(1,2.5)} 
O èlegqoc an prìkeitai perÐ dimeroÔc grˆfou 
(True)   ìqi (False) gÐnetai me thn entol : 
print bipartite . is_bipartite (G) 
True 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
O sqediasmìc tou dimeroÔc grˆfou gÐnetai wc 
ex c: 
mode1 , mode2 = bipartite . sets (G) 
nx. draw_networkx_nodes (G,pos , nodelist = list ( mode1 ), 
node_color ='b',node_size = 700) 
nx. draw_networkx_nodes (G,pos , nodelist = list ( mode2 ), 
node_color ='g',node_size = 700) 
nx. draw_networkx_edges (G, pos) 
nx. draw_networkx_labels (G,pos , font_size =20 , 
font_color ='# FFFFFF ') 
plt . axis ('off ') 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Qarakthristikˆ (Attributes) Kìmbwn kai Akm¸n 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
TÔpoi Grˆfwn kai Sqesiak¸n Dedomènwn 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Genn torec Prokataskeuasmènwn Grˆfwn 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
BajmoÐ Kìmbwn 
Pr¸ta, gia mh kateujunìmenouc grˆfouc: O grˆfoc 
G = (V, E) sto sÔnolo koruf¸n V eÐnai mh kateujunìmenoc, ìtan to 
sÔnolo twn akm¸n tou E eÐnai èna summetrikì uposÔnolo tou V  V. 
GeÐtonec kìmbwn: Gia duo korufèc i, j 2 V tou G, h j lègetai 
geÐtonac thc i ìtan (i, j) 2 E. 
G. nodes () # List of nodes 
G. number_of_nodes () # Number of nodes 
len (G) # Number of nodes 
G. order () # Number of nodes 
G. number_of_edges () # Number of of edges 
G. neighbors (1) # Neighbors of node 1 
## To get the list of neighbors of all nodes : 
for node in G. nodes (): 
print node , G. neighbors ( node ) 
PÐnakac GeitnÐashc (Adjacency Matrix): EÐnai ènac 
(summetrikìc) pÐnakac A = fAgi,j2V tˆxhc jVj  jVj tètoioc ¸ste 
A = 1, ìtan i, j geÐtonec, A = 0, diaforetikˆ. 
A = nx. to_numpy_matrix (G) 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
BajmoÐ kìmbwn: Sto mh kateujunìmeno grˆfo G, o 
bajmìc miac koruf c i, pou sumbolÐzetai wc ki, 
orÐzetai san to pl joc twn geitìnwn tou i, 
dhlad , to pl joc twn sundèsewn pou 
prospÐptoun sto i. Profan¸c, isqÔei: 
ki = 
X 
j2V 
A = 
X 
i2V 
A 
ki, epiplèon, 
X 
i2V 
ki = 
X 
i,j2V 
A = 2jEj 
G. degree (1) # Degree of node 1 
len (G. neighbors (1) # Degree of node 1 
G. degree () # List of degrees of all nodes 
## To get the table of degrees of all nodes : 
for node in G. nodes (): 
print node , G. degree ( node ) 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
BajmoÐ Kìmbwn Kateujunìmenwn Grˆfwn 
'Estw o kateujunìmenoc grˆfoc G = (V, E) sto sÔnolo koruf¸n V, 
ìpou t¸ra to sÔnolo twn akm¸n tou E eÐnai èna mh summetrikì 
uposÔnolo tou V  V ki o antÐstoiqoc pÐnakac geitnÐashc A = fAg 
eÐnai mh summetrikìc. 
O bajmìc eisìdou thc koruf c i tou G, pou sumbolÐzetai wc kin i , 
orÐzetai san to pl joc twn sundèsewn pou xekinoÔn apì geÐtonec 
tou i kai kateujÔnontai proc ton i, dhlad , 
kin 
i = 
X 
j2V 
A 
O bajmìc exìdou thc koruf c i tou G, pou sumbolÐzetai wc kout i , 
orÐzetai san to pl joc twn sundèsewn pou xekinoÔn apì ton i kai 
kateujÔnontai proc geÐtonec tou i, dhlad , 
kout 
i = 
X 
i2V 
A 
Profan¸c, isqÔei: 
X 
i2V 
kin 
i = 
X 
j2V 
kout 
i = 
X 
i,j2V 
A = jEj 
G. in_degree (1) #In - Degree of node 1 
G. out_degree (1) #Out - Degree of node 1 
G. in_degree () # List of in - degrees of all nodes 
G. out_degree () # List of out - degrees of all nodes 
## To get the table of in - degrees and out - degrees of all nodes : 
for node in G. nodes (): 
print node , G. in_degree ( node ), G. out_degree ( node ) 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Katanomèc Bajm¸n 
Istìgramma katanom c bajm¸n (gia mh kateujunìmeno grˆfo): 
degrees = G. degree () 
values = sorted ( set ( degrees . values ())) 
hist = [ degrees . values (). count (x) for x in values ] 
fig = plt . figure () 
ax = fig . add_subplot ( 111 ) 
plt . plot ( values ,hist ,'ro -') 
#ax . set_xscale (' log ') # Logarithmic x scale 
#ax . set_yscale (' log ') # Logarithmic y scale 
plt . title ( Degree Distribution ) 
plt . xlabel ('Degree ') 
plt . ylabel ('Number of nodes ') 
Istìgramma katanom c bajm¸n (gia kateujunìmeno grˆfo): 
## in_degrees = G. in_degree () 
in_values = sorted ( set ( in_degrees . values ())) 
in_hist = [ in_degrees . values (). count (x) for x in in_values ] 
out_degrees = G. out_degree () 
out_values = sorted ( set ( out_degrees . values ())) 
out_hist = [ out_degrees . values (). count (x) for x in out_values ] 
fig = plt . figure () 
ax = fig . add_subplot ( 111 ) 
plt . plot ( in_values , in_hist ,'ro -') 
plt . plot ( out_values , out_hist ,'bv -') 
#ax . set_xscale (' log ') # Logarithmic x scale 
#ax . set_yscale (' log ') # Logarithmic y scale 
plt . titke (In - Degree  Out - Degree Distributions ) 
plt . xlabel ('Degree ') 
plt . ylabel ('Number of nodes ') 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Parˆdeigma: To dÐktuo karˆte 
G = nx. karate_club_graph () 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Kentrikìthtec Kìmbwn: 
1. Kentrikìthta BajmoÔ (Degree Centrality) 
Oi orismoÐ OLWN twn kentrikìthtwn pou ja d¸soume 
ed¸ kai sth sunèqeia aforoÔn mh kateujunìmenouc 
(aploÔc) grˆfouc. 
H kentrikìthta bajmoÔ (degree centrality) xi tou kìmbou 
i isoÔtai proc ton bajmì ki tou kìmbou autoÔ: 
xi = ki 
x8 = 5 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
2. Kentrikìthta Endiamesìthtac 
(Betweenness Centrality) 
H kentrikìthta endiamesìthtac (betweenness centrality) xi tou kìmbou 
i isoÔtai proc: 
xi = 
X 
s6=i6=t2V 
nist 
gst 
ìpou nist eÐnai to pl joc twn gewdaitik¸n diadrom¸n metaxÔ twn 
kìmbwn s kai t, pou pernoÔn apì ton kìmbo i, kai gst eÐnai to sunolikì 
pl joc twn gewdaitik¸n diadrom¸n metaxÔ twn kìmbwn s kai t. 
n23 
,23 = 2 
g3,23 = 4 
x2 = 0.1436 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
3. Kentrikìthta EggÔthtac 
(Closeness Centrality) 
H kentrikìthta eggÔthtac (closeness centrality) xi tou kìmbou i 
isoÔtai proc: 
xi = 
n P 
j2V d 
ìpou n eÐnai to pl joc twn kìmbwn tou grˆfou kai d h gewdaitik  
apìstash apì ton kìmbo i proc opoiod pote ˆllo kìmbo j. 
x0 = 0.5689 
x2 = 0.5593 
x33 = 0.55 
x31 = 0.5409 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
4. Kentrikìthta IdiodianÔsmatoc 
(Eigenvector Centrality) 
H kentrikìthta idiodianÔsmatoc (eigenvector centrality) xi tou kìmbou i 
isoÔtai proc: 
xi = 1 
1 
X 
j2V 
Axj 
ìpou A eÐnai o pÐnakac geitnÐashc (adjacency matrix) tou grˆfou kai 
xi eÐnai oi sunist¸sec tou idiadianÔsmatoc tou A, pou antistoiqoÔn 
sth megalÔterh idiotim  tou 1. 
x33 = 0.3734 
x0 = 0.3555 
x2 = 0.3172 
x32 = 0.3086 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Upologismìc Kentrikìthtwn 
Entolèc NetworkX: 
nx. degree_centrality (G) 
nx. betweenness_centrality (G) 
nx. closeness_centrality (G) 
nx. eigenvector_centrality (G) 
EktÔpwsh se pÐnaka: 
centralities = [] 
centralities . append (nx. degree_centrality (G )); 
centralities . append (nx. betweenness_centrality (G )); 
centralities . append (nx. closeness_centrality (G)); 
centralities . append (nx. eigenvector_centrality (G )); 
for node in G. nodes_iter (): 
measures = (t). join ( map ( lambda f: str(f[ node ]), 
centralities )) 
print %s %s % (node , measures ) 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Parˆdeigma: To dÐktuo Karˆte 
G = nx. karate_club_graph () 
Nodes Degree C. Betweenness C. Closeness C. Eigenvector C. 
0 0.484848485 0.437635281 0.568965517 0.355490721 
1 0.272727273 0.053936688 0.485294118 0.265959605 
2 0.303030303 0.143656806 0.559322034 0.317192417 
3 0.181818182 0.011909271 0.464788732 0.211179694 
4 0.090909091 0.000631313 0.379310345 0.075968879 
5 0.121212121 0.029987374 0.38372093 0.079483113 
6 0.121212121 0.029987374 0.38372093 0.079483113 
7 0.121212121 0 0.44 0.170959892 
8 0.151515152 0.055926828 0.515625 0.227404355 
9 0.060606061 0.000847763 0.434210526 0.102674504 
10 0.090909091 0.000631313 0.379310345 0.075968879 
11 0.03030303 0 0.366666667 0.052855817 
12 0.060606061 0 0.370786517 0.084254727 
13 0.151515152 0.045863396 0.515625 0.226473112 
14 0.060606061 0 0.370786517 0.10140365 
15 0.060606061 0 0.370786517 0.10140365 
16 0.060606061 0 0.284482759 0.023635566 
17 0.060606061 0 0.375 0.092399699 
18 0.060606061 0 0.370786517 0.10140365 
19 0.090909091 0.032475048 0.5 0.147912918 
20 0.060606061 0 0.370786517 0.10140365 
21 0.060606061 0 0.375 0.092399699 
22 0.060606061 0 0.370786517 0.10140365 
23 0.151515152 0.017613636 0.392857143 0.150118912 
24 0.090909091 0.002209596 0.375 0.057052326 
25 0.090909091 0.003840488 0.375 0.059206342 
26 0.060606061 0 0.362637363 0.075579616 
27 0.121212121 0.022333454 0.458333333 0.133477386 
28 0.090909091 0.001794733 0.452054795 0.131077964 
29 0.121212121 0.002922078 0.38372093 0.134961122 
30 0.121212121 0.014411977 0.458333333 0.174758637 
31 0.181818182 0.138275613 0.540983607 0.191034394 
32 0.363636364 0.145247114 0.515625 0.308643749 
33 0.515151515 0.304074976 0.55 0.373362539 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Kentrikìthta Mikr  tim  Megˆlh tim  
Degree LÐgoi geÐtonec (sundèseic) PolloÐ geÐtonec (sundèseic) 
Betweenness Mikrìc èlegqoc ro c Megˆloc èlegqoc ro c 
Closeness Proc thn perifèreia Proc to kèntro 
Eigenvector LÐgoi   lÐgo shmantikoÐ geÐtonec PolloÐ   polÔ shmantikoÐ geÐtonec 
To dÐktuo twn stratiwtik¸n tou David Krackhardt: 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Suntelest c Suss¸reushc 
O suntelest c suss¸reushc (clustering coefficient) Ci tou kìmbou i 
orÐzetai wc: 
Ci = 
2i 
ki(ki  1) 
, 
ìpou i eÐnai to pl joc twn sundèsewn metaxÔ twn geitonik¸n 
kìmbwn tou i kai d i proc opoiod pote ˆllo kìmbo ki eÐnai to 
pl joc twn geitonik¸n kìmbwn tou i. 
nx. clustering (G) # Clustering coefficients of all nodes 
nx. clustering (G,n) # Clustering coefficient of node n 
C23 = 
2  4 
5  4 = 0.4 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Diktuak  Metabatikìthta 
O sunolikìc suntelest c suss¸reushc (global clustering coefficient) 
(ìlou) tou grˆfou G orÐzetai wc h mèsh tim  twn suntelest¸n 
suss¸reushc twn kìmbwn tou: 
C(G) = 
1 
jVj 
X 
i 
Ci 
H metabatikìthta (transitivity) tou grˆfou G orÐzetai wc to phlÐko: 
T(G) = 
pl joc trig¸nwn 
pl joc sundedemènwn triˆdwn 
nx. average_clustering (G) 
# Graph clustering coefficient 
nx. transitivity (G) 
# Graph transitivity 
C(G) = 0.16 
T(G) = 0.19 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Amoibaiìthta Sundèsewn se Kateujunìmeno Grˆfo 
Se ènan kateujunìmeno grˆfo, o suntelest c amoibaiìthtac 
sundèsewn/desm¸n (link/tie mutuality coefficient) orÐzetai wc ex c: 
M(G) = 
pl joc antapodidìmenwn sundèsewn 
pl joc ìlwn twn sundèsewn/tìxwn 
G. to_undirected ( True ). size () 
# Reciprocated edges 
G. number_of_edges () 
# Total edges 
Er(G) = 64 
E(G) = 195 
M(G) = 0.3282 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Apostˆseic 
Se ènan grˆfo G, gia kˆje duo kìmbouc i, j, h (gewdaitik ) apìstas  
touc d(i, j) orÐzetai wc to m koc thc suntomìterhc diadrom c apì to i 
sto j, efìson oi kìmboi autoÐ eÐnai sundedemènoi, en¸ d(i, j) = 1, 
diaforetikˆ (kai fusikˆ, d(i, i) = 0). (H ‘‘suntomìterh diadrom ’’ 
metaxÔ duo kìmbwn eÐnai h diadrom  pou èqei to elˆqisto m koc 
anˆmesa se ìlec tic diadromèc metaxÔ twn duo kìmbwn.) 
To mèso m koc suntomìterhc diadrom c (average shortest path length) 
orÐzetai wc ex c: 
a = 
1 
jVj(jVj  1) 
X 
i,j2V 
d(i, j) 
a = nx. average_shortest_path_length (G) 
a = 2.4082 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Mètra Diˆforwn Empeirik¸n DiktÔwn TABLE I. The general characteristics of several real networks. For each network we indicated the number of nodes, the average 
degree !k, the average path length ! and the clustering coefficient C. For a comparison we have included the average path 
length !rand and clustering coefficient Crand of a random graph with the same size and average degree. The last column 
identifies the symbols in Figs. 8 and 9. 
Network Size !k ! !rand C Crand Reference Nr. 
WWW, site level, undir. 153, 127 35.21 3.1 3.35 0.1078 0.00023 Adamic 1999 Internet, domain level 3015 - 6209 3.52 - 4.11 3.7 - 3.76 6.36 - 6.18 0.18 - 0.3 0.001 Yook et al. 2001a, 
Pastor-Satorras et al. 2001 Movie actors 225, 226 61 3.65 2.99 0.79 0.00027 Watts, Strogatz 1998 LANL coauthorship 52, 909 9.7 5.9 4.79 0.43 1.8 × 10−4 Newman 2001a,b MEDLINE coauthorship 1, 520, 251 18.1 4.6 4.91 0.066 1.1 × 10−5 Newman 2001a,b SPIRES coauthorship 56, 627 173 4.0 2.12 0.726 0.003 Newman 2001a,b,c NCSTRL coauthorship 11, 994 3.59 9.7 7.34 0.496 3 × 10−4 Newman 2001a,b Math coauthorship 70, 975 3.9 9.5 8.2 0.59 5.4 × 10−5 Barab´asi et al. 2001 Neurosci. coauthorship 209, 293 11.5 6 5.01 0.76 5.5 × 10−5 Barab´asi et al. 2001 E. coli, substrate graph 282 7.35 2.9 3.04 0.32 0.026 Wagner, Fell 2000 10 
E. coli, reaction graph 315 28.3 2.62 1.98 0.59 0.09 Wagner, Fell 2000 11 
Ythan estuary food web 134 8.7 2.43 2.26 0.22 0.06 Montoya, Sol´e 2000 12 
Silwood park food web 154 4.75 3.40 3.23 0.15 0.03 Montoya, Sol´e 2000 13 
Words, cooccurence 460.902 70.13 2.67 3.03 0.437 0.0001 Cancho, Sol´e 2001 14 
Words, synonyms 22, 311 13.48 4.5 3.84 0.7 0.0006 Yook et al. 2001 15 
Power grid 4, 941 2.67 18.7 12.4 0.08 0.005 Watts, Strogatz 1998 16 
C. Elegans 282 14 2.65 2.25 0.28 0.05 Watts, Strogatz 1998 17 
TABLE II. The scaling exponents characterizing the degree distribution of several scale-free networks, for which P(k) follows 
a power-law (2). We indicate the size of the network, its average degree !k and the cutoff  for the power-law scaling. For 
directed networks we list separately the indegree (#in) and outdegree (#out) exponents, while for the undirected networks, 
marked with a star, these values are identical. The columns lreal , lrand and lpow compare the average path length of real 
networks with power-law degree distribution and the prediction of random graph theory (17) and that of Newman, Strogatz 
and Watts (2000) (62), as discussed in Sect. V. The last column identifies the symbols in Figs. 8 and 9. 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Sunist¸sec kai KlÐkec 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Sunist¸sec kai KlÐkec 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Blockmodeling 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Koinìthtec (Communities) 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Anameiximìthta (Assortativity) 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
Epirro  kai Diˆqush 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
DÐktua Mikr¸n Kìsmwn (Small–Worlds) 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
DÐktua QwrÐc KlÐmaka (Scale–Free) 
Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python

More Related Content

What's hot

Python basic
Python basic Python basic
Python basic
sewoo lee
 
Diving into byte code optimization in python
Diving into byte code optimization in python Diving into byte code optimization in python
Diving into byte code optimization in python
Chetan Giridhar
 
Let's golang
Let's golangLet's golang
Let's golang
SuHyun Jeon
 
Byterun, a Python bytecode interpreter - Allison Kaptur at NYCPython
Byterun, a Python bytecode interpreter - Allison Kaptur at NYCPythonByterun, a Python bytecode interpreter - Allison Kaptur at NYCPython
Byterun, a Python bytecode interpreter - Allison Kaptur at NYCPython
akaptur
 
Allison Kaptur: Bytes in the Machine: Inside the CPython interpreter, PyGotha...
Allison Kaptur: Bytes in the Machine: Inside the CPython interpreter, PyGotha...Allison Kaptur: Bytes in the Machine: Inside the CPython interpreter, PyGotha...
Allison Kaptur: Bytes in the Machine: Inside the CPython interpreter, PyGotha...
akaptur
 
Pycon 2011 talk (may not be final, note)
Pycon 2011 talk (may not be final, note)Pycon 2011 talk (may not be final, note)
Pycon 2011 talk (may not be final, note)
c.titus.brown
 
Goptuna Distributed Bayesian Optimization Framework at Go Conference 2019 Autumn
Goptuna Distributed Bayesian Optimization Framework at Go Conference 2019 AutumnGoptuna Distributed Bayesian Optimization Framework at Go Conference 2019 Autumn
Goptuna Distributed Bayesian Optimization Framework at Go Conference 2019 Autumn
Masashi Shibata
 
Libraries
LibrariesLibraries
A Beginners Guide to Weather & Climate Data, Margriet Groenendijk
A Beginners Guide to Weather & Climate Data, Margriet GroenendijkA Beginners Guide to Weather & Climate Data, Margriet Groenendijk
A Beginners Guide to Weather & Climate Data, Margriet Groenendijk
Pôle Systematic Paris-Region
 
Slicing
SlicingSlicing
PyCon 2011 talk - ngram assembly with Bloom filters
PyCon 2011 talk - ngram assembly with Bloom filtersPyCon 2011 talk - ngram assembly with Bloom filters
PyCon 2011 talk - ngram assembly with Bloom filters
c.titus.brown
 
Strings
StringsStrings
Go for the paranoid network programmer
Go for the paranoid network programmerGo for the paranoid network programmer
Go for the paranoid network programmer
Eleanor McHugh
 
Advanced Concepts in Python
Advanced Concepts in PythonAdvanced Concepts in Python
Advanced Concepts in Python
Saraswathi Murugan
 
Python Tidbits
Python TidbitsPython Tidbits
Python Tidbits
Mitchell Vitez
 
BT-led점등
BT-led점등BT-led점등
BT-led점등
InHee Kim
 
Alias
AliasAlias
Not Really Engineering, Barely a Science
Not Really Engineering, Barely a ScienceNot Really Engineering, Barely a Science
Not Really Engineering, Barely a Science
Rod Begbie
 
Tutorial: Python, PuLP and GLPK
Tutorial: Python, PuLP and GLPKTutorial: Python, PuLP and GLPK
Tutorial: Python, PuLP and GLPK
sucha
 
Introdução ao Retrofit
Introdução ao Retrofit Introdução ao Retrofit
Introdução ao Retrofit
Felipe Pedroso
 

What's hot (20)

Python basic
Python basic Python basic
Python basic
 
Diving into byte code optimization in python
Diving into byte code optimization in python Diving into byte code optimization in python
Diving into byte code optimization in python
 
Let's golang
Let's golangLet's golang
Let's golang
 
Byterun, a Python bytecode interpreter - Allison Kaptur at NYCPython
Byterun, a Python bytecode interpreter - Allison Kaptur at NYCPythonByterun, a Python bytecode interpreter - Allison Kaptur at NYCPython
Byterun, a Python bytecode interpreter - Allison Kaptur at NYCPython
 
Allison Kaptur: Bytes in the Machine: Inside the CPython interpreter, PyGotha...
Allison Kaptur: Bytes in the Machine: Inside the CPython interpreter, PyGotha...Allison Kaptur: Bytes in the Machine: Inside the CPython interpreter, PyGotha...
Allison Kaptur: Bytes in the Machine: Inside the CPython interpreter, PyGotha...
 
Pycon 2011 talk (may not be final, note)
Pycon 2011 talk (may not be final, note)Pycon 2011 talk (may not be final, note)
Pycon 2011 talk (may not be final, note)
 
Goptuna Distributed Bayesian Optimization Framework at Go Conference 2019 Autumn
Goptuna Distributed Bayesian Optimization Framework at Go Conference 2019 AutumnGoptuna Distributed Bayesian Optimization Framework at Go Conference 2019 Autumn
Goptuna Distributed Bayesian Optimization Framework at Go Conference 2019 Autumn
 
Libraries
LibrariesLibraries
Libraries
 
A Beginners Guide to Weather & Climate Data, Margriet Groenendijk
A Beginners Guide to Weather & Climate Data, Margriet GroenendijkA Beginners Guide to Weather & Climate Data, Margriet Groenendijk
A Beginners Guide to Weather & Climate Data, Margriet Groenendijk
 
Slicing
SlicingSlicing
Slicing
 
PyCon 2011 talk - ngram assembly with Bloom filters
PyCon 2011 talk - ngram assembly with Bloom filtersPyCon 2011 talk - ngram assembly with Bloom filters
PyCon 2011 talk - ngram assembly with Bloom filters
 
Strings
StringsStrings
Strings
 
Go for the paranoid network programmer
Go for the paranoid network programmerGo for the paranoid network programmer
Go for the paranoid network programmer
 
Advanced Concepts in Python
Advanced Concepts in PythonAdvanced Concepts in Python
Advanced Concepts in Python
 
Python Tidbits
Python TidbitsPython Tidbits
Python Tidbits
 
BT-led점등
BT-led점등BT-led점등
BT-led점등
 
Alias
AliasAlias
Alias
 
Not Really Engineering, Barely a Science
Not Really Engineering, Barely a ScienceNot Really Engineering, Barely a Science
Not Really Engineering, Barely a Science
 
Tutorial: Python, PuLP and GLPK
Tutorial: Python, PuLP and GLPKTutorial: Python, PuLP and GLPK
Tutorial: Python, PuLP and GLPK
 
Introdução ao Retrofit
Introdução ao Retrofit Introdução ao Retrofit
Introdução ao Retrofit
 

Viewers also liked

Topics of Complex Social Networks: Domination, Influence and Assortativity
Topics of Complex Social Networks: Domination, Influence and AssortativityTopics of Complex Social Networks: Domination, Influence and Assortativity
Topics of Complex Social Networks: Domination, Influence and Assortativity
Moses Boudourides
 
Πανεπιστήμιο και Κοινωνία των Πολιτών: Στοιχεία & Περιπτώσεις Αποικιοποίησ...
Πανεπιστήμιο και Κοινωνία των Πολιτών: Στοιχεία & Περιπτώσεις Αποικιοποίησ...Πανεπιστήμιο και Κοινωνία των Πολιτών: Στοιχεία & Περιπτώσεις Αποικιοποίησ...
Πανεπιστήμιο και Κοινωνία των Πολιτών: Στοιχεία & Περιπτώσεις Αποικιοποίησ...
Moses Boudourides
 
Boudourides: Risk in Social Networks: Network Influence & Selection on Minori...
Boudourides: Risk in Social Networks: Network Influence & Selection on Minori...Boudourides: Risk in Social Networks: Network Influence & Selection on Minori...
Boudourides: Risk in Social Networks: Network Influence & Selection on Minori...
Moses Boudourides
 
Δίκτυα Λογοτεχνίας: Μια Πρώτη Εισαγωγική Προσέγγιση
Δίκτυα Λογοτεχνίας: Μια Πρώτη Εισαγωγική ΠροσέγγισηΔίκτυα Λογοτεχνίας: Μια Πρώτη Εισαγωγική Προσέγγιση
Δίκτυα Λογοτεχνίας: Μια Πρώτη Εισαγωγική Προσέγγιση
Moses Boudourides
 
Πρότζεκτ για δίκτυα του LinkedIn με την Python
Πρότζεκτ για δίκτυα του LinkedIn με την PythonΠρότζεκτ για δίκτυα του LinkedIn με την Python
Πρότζεκτ για δίκτυα του LinkedIn με την PythonMoses Boudourides
 
Μαθαίνοντας την R σε μια ώρα
Μαθαίνοντας την R σε μια ώραΜαθαίνοντας την R σε μια ώρα
Μαθαίνοντας την R σε μια ώρα
Moses Boudourides
 
Dominating Sets, Multiple Egocentric Networks and Modularity Maximizing Clust...
Dominating Sets, Multiple Egocentric Networks and Modularity Maximizing Clust...Dominating Sets, Multiple Egocentric Networks and Modularity Maximizing Clust...
Dominating Sets, Multiple Egocentric Networks and Modularity Maximizing Clust...
Moses Boudourides
 
Διακριτά Μαθηματικά Ι: Εισαγωγή στη Λογική. Του Μωυσή Μπουντουρίδη
Διακριτά Μαθηματικά Ι: Εισαγωγή στη Λογική. Του Μωυσή ΜπουντουρίδηΔιακριτά Μαθηματικά Ι: Εισαγωγή στη Λογική. Του Μωυσή Μπουντουρίδη
Διακριτά Μαθηματικά Ι: Εισαγωγή στη Λογική. Του Μωυσή Μπουντουρίδη
Moses Boudourides
 
Extended Cyclic Cellular Automata: Emulating Social Influence. By Moses A. Bo...
Extended Cyclic Cellular Automata: Emulating Social Influence. By Moses A. Bo...Extended Cyclic Cellular Automata: Emulating Social Influence. By Moses A. Bo...
Extended Cyclic Cellular Automata: Emulating Social Influence. By Moses A. Bo...
Moses Boudourides
 
Διακριτά Μαθηματικά ΙI: Εισαγωγή στη Συνδυαστική. Του Μωυσή Μπουντουρίδη
Διακριτά Μαθηματικά ΙI: Εισαγωγή στη Συνδυαστική. Του Μωυσή ΜπουντουρίδηΔιακριτά Μαθηματικά ΙI: Εισαγωγή στη Συνδυαστική. Του Μωυσή Μπουντουρίδη
Διακριτά Μαθηματικά ΙI: Εισαγωγή στη Συνδυαστική. Του Μωυσή Μπουντουρίδη
Moses Boudourides
 
Digital, Humanities, Latour and Networks. By Moses A. Boudourides
Digital, Humanities, Latour and Networks. By Moses A. BoudouridesDigital, Humanities, Latour and Networks. By Moses A. Boudourides
Digital, Humanities, Latour and Networks. By Moses A. Boudourides
Moses Boudourides
 
[Up! Essência] Produtos
[Up! Essência] Produtos[Up! Essência] Produtos
[Up! Essência] Produtos
fazedoresdetendas
 
Letters From Kay
Letters From KayLetters From Kay
Letters From Kay
Jack Kurland
 
Hasil pengamatan gum xantan
Hasil pengamatan gum xantanHasil pengamatan gum xantan
Hasil pengamatan gum xantan
Dn Ssd
 
Physical activity
Physical  activityPhysical  activity
Physical activity
Shreya Sharma
 
Dye dining room furniture selections
Dye dining room furniture selectionsDye dining room furniture selections
Dye dining room furniture selections
Erica Peale
 
Website documents
Website documentsWebsite documents
Website documents
jayam19
 
Goo Create: Import animation
Goo Create: Import animationGoo Create: Import animation
Goo Create: Import animation
Goo Technologies
 
Goo Create: Import and Create
Goo Create: Import and CreateGoo Create: Import and Create
Goo Create: Import and Create
Goo Technologies
 

Viewers also liked (20)

Topics of Complex Social Networks: Domination, Influence and Assortativity
Topics of Complex Social Networks: Domination, Influence and AssortativityTopics of Complex Social Networks: Domination, Influence and Assortativity
Topics of Complex Social Networks: Domination, Influence and Assortativity
 
Πανεπιστήμιο και Κοινωνία των Πολιτών: Στοιχεία & Περιπτώσεις Αποικιοποίησ...
Πανεπιστήμιο και Κοινωνία των Πολιτών: Στοιχεία & Περιπτώσεις Αποικιοποίησ...Πανεπιστήμιο και Κοινωνία των Πολιτών: Στοιχεία & Περιπτώσεις Αποικιοποίησ...
Πανεπιστήμιο και Κοινωνία των Πολιτών: Στοιχεία & Περιπτώσεις Αποικιοποίησ...
 
Boudourides: Risk in Social Networks: Network Influence & Selection on Minori...
Boudourides: Risk in Social Networks: Network Influence & Selection on Minori...Boudourides: Risk in Social Networks: Network Influence & Selection on Minori...
Boudourides: Risk in Social Networks: Network Influence & Selection on Minori...
 
Δίκτυα Λογοτεχνίας: Μια Πρώτη Εισαγωγική Προσέγγιση
Δίκτυα Λογοτεχνίας: Μια Πρώτη Εισαγωγική ΠροσέγγισηΔίκτυα Λογοτεχνίας: Μια Πρώτη Εισαγωγική Προσέγγιση
Δίκτυα Λογοτεχνίας: Μια Πρώτη Εισαγωγική Προσέγγιση
 
Πρότζεκτ για δίκτυα του LinkedIn με την Python
Πρότζεκτ για δίκτυα του LinkedIn με την PythonΠρότζεκτ για δίκτυα του LinkedIn με την Python
Πρότζεκτ για δίκτυα του LinkedIn με την Python
 
Μαθαίνοντας την R σε μια ώρα
Μαθαίνοντας την R σε μια ώραΜαθαίνοντας την R σε μια ώρα
Μαθαίνοντας την R σε μια ώρα
 
Dominating Sets, Multiple Egocentric Networks and Modularity Maximizing Clust...
Dominating Sets, Multiple Egocentric Networks and Modularity Maximizing Clust...Dominating Sets, Multiple Egocentric Networks and Modularity Maximizing Clust...
Dominating Sets, Multiple Egocentric Networks and Modularity Maximizing Clust...
 
Διακριτά Μαθηματικά Ι: Εισαγωγή στη Λογική. Του Μωυσή Μπουντουρίδη
Διακριτά Μαθηματικά Ι: Εισαγωγή στη Λογική. Του Μωυσή ΜπουντουρίδηΔιακριτά Μαθηματικά Ι: Εισαγωγή στη Λογική. Του Μωυσή Μπουντουρίδη
Διακριτά Μαθηματικά Ι: Εισαγωγή στη Λογική. Του Μωυσή Μπουντουρίδη
 
Extended Cyclic Cellular Automata: Emulating Social Influence. By Moses A. Bo...
Extended Cyclic Cellular Automata: Emulating Social Influence. By Moses A. Bo...Extended Cyclic Cellular Automata: Emulating Social Influence. By Moses A. Bo...
Extended Cyclic Cellular Automata: Emulating Social Influence. By Moses A. Bo...
 
Διακριτά Μαθηματικά ΙI: Εισαγωγή στη Συνδυαστική. Του Μωυσή Μπουντουρίδη
Διακριτά Μαθηματικά ΙI: Εισαγωγή στη Συνδυαστική. Του Μωυσή ΜπουντουρίδηΔιακριτά Μαθηματικά ΙI: Εισαγωγή στη Συνδυαστική. Του Μωυσή Μπουντουρίδη
Διακριτά Μαθηματικά ΙI: Εισαγωγή στη Συνδυαστική. Του Μωυσή Μπουντουρίδη
 
Digital, Humanities, Latour and Networks. By Moses A. Boudourides
Digital, Humanities, Latour and Networks. By Moses A. BoudouridesDigital, Humanities, Latour and Networks. By Moses A. Boudourides
Digital, Humanities, Latour and Networks. By Moses A. Boudourides
 
[Up! Essência] Produtos
[Up! Essência] Produtos[Up! Essência] Produtos
[Up! Essência] Produtos
 
Letters From Kay
Letters From KayLetters From Kay
Letters From Kay
 
Alternativas
AlternativasAlternativas
Alternativas
 
Hasil pengamatan gum xantan
Hasil pengamatan gum xantanHasil pengamatan gum xantan
Hasil pengamatan gum xantan
 
Physical activity
Physical  activityPhysical  activity
Physical activity
 
Dye dining room furniture selections
Dye dining room furniture selectionsDye dining room furniture selections
Dye dining room furniture selections
 
Website documents
Website documentsWebsite documents
Website documents
 
Goo Create: Import animation
Goo Create: Import animationGoo Create: Import animation
Goo Create: Import animation
 
Goo Create: Import and Create
Goo Create: Import and CreateGoo Create: Import and Create
Goo Create: Import and Create
 

Similar to Ανάλυση Δικτύων με το NetworkX της Python: Μια προκαταρκτική (αλλά ημιτελής ως το καλοκαίρι 2014) εισαγωγή

Python networkx library quick start guide
Python networkx library quick start guidePython networkx library quick start guide
Python networkx library quick start guide
Universiti Technologi Malaysia (UTM)
 
Towards neuralprocessingofgeneralpurposeapproximateprograms
Towards neuralprocessingofgeneralpurposeapproximateprogramsTowards neuralprocessingofgeneralpurposeapproximateprograms
Towards neuralprocessingofgeneralpurposeapproximateprograms
Paridha Saxena
 
NeuralProcessingofGeneralPurposeApproximatePrograms
NeuralProcessingofGeneralPurposeApproximateProgramsNeuralProcessingofGeneralPurposeApproximatePrograms
NeuralProcessingofGeneralPurposeApproximatePrograms
Mohid Nabil
 
Tensorflow in practice by Engineer - donghwi cha
Tensorflow in practice by Engineer - donghwi chaTensorflow in practice by Engineer - donghwi cha
Tensorflow in practice by Engineer - donghwi cha
Donghwi Cha
 
Machine Learning on Code - SF meetup
Machine Learning on Code - SF meetupMachine Learning on Code - SF meetup
Machine Learning on Code - SF meetup
source{d}
 
Session 09 learning relationships.pptx
Session 09 learning relationships.pptxSession 09 learning relationships.pptx
Session 09 learning relationships.pptx
Sara-Jayne Terp
 
Session 09 learning relationships.pptx
Session 09 learning relationships.pptxSession 09 learning relationships.pptx
Session 09 learning relationships.pptx
bodaceacat
 
Threading Is Not A Model
Threading Is Not A ModelThreading Is Not A Model
Threading Is Not A Model
guest2a5acfb
 
Neural network
Neural networkNeural network
Neural network
Babu Priyavrat
 
A peek on numerical programming in perl and python e christopher dyken 2005
A peek on numerical programming in perl and python  e christopher dyken  2005A peek on numerical programming in perl and python  e christopher dyken  2005
A peek on numerical programming in perl and python e christopher dyken 2005
Jules Krdenas
 
DSD-INT 2018 Work with iMOD MODFLOW models in Python - Visser Bootsma
DSD-INT 2018 Work with iMOD MODFLOW models in Python - Visser BootsmaDSD-INT 2018 Work with iMOD MODFLOW models in Python - Visser Bootsma
DSD-INT 2018 Work with iMOD MODFLOW models in Python - Visser Bootsma
Deltares
 
Python for Scientific Computing -- Ricardo Cruz
Python for Scientific Computing -- Ricardo CruzPython for Scientific Computing -- Ricardo Cruz
Python for Scientific Computing -- Ricardo Cruz
rpmcruz
 
Exceeding Classical: Probabilistic Data Structures in Data Intensive Applicat...
Exceeding Classical: Probabilistic Data Structures in Data Intensive Applicat...Exceeding Classical: Probabilistic Data Structures in Data Intensive Applicat...
Exceeding Classical: Probabilistic Data Structures in Data Intensive Applicat...
Andrii Gakhov
 
ScaleGraph - A High-Performance Library for Billion-Scale Graph Analytics
ScaleGraph - A High-Performance Library for Billion-Scale Graph AnalyticsScaleGraph - A High-Performance Library for Billion-Scale Graph Analytics
ScaleGraph - A High-Performance Library for Billion-Scale Graph Analytics
Toyotaro Suzumura
 
Introduction to Tensorflow
Introduction to TensorflowIntroduction to Tensorflow
Introduction to Tensorflow
Tzar Umang
 
Unsupervised program synthesis
Unsupervised program synthesisUnsupervised program synthesis
Unsupervised program synthesis
Amrith Krishna
 
Python for Scientists
Python for ScientistsPython for Scientists
Python for Scientists
Andreas Dewes
 
NSC #2 - D2 06 - Richard Johnson - SAGEly Advice
NSC #2 - D2 06 - Richard Johnson - SAGEly AdviceNSC #2 - D2 06 - Richard Johnson - SAGEly Advice
NSC #2 - D2 06 - Richard Johnson - SAGEly Advice
NoSuchCon
 
V design and implementation of network security using genetic algorithm
V design and implementation of network security using genetic algorithmV design and implementation of network security using genetic algorithm
V design and implementation of network security using genetic algorithm
eSAT Journals
 
Design and implementation of network security using genetic algorithm
Design and implementation of network security using genetic algorithmDesign and implementation of network security using genetic algorithm
Design and implementation of network security using genetic algorithm
eSAT Publishing House
 

Similar to Ανάλυση Δικτύων με το NetworkX της Python: Μια προκαταρκτική (αλλά ημιτελής ως το καλοκαίρι 2014) εισαγωγή (20)

Python networkx library quick start guide
Python networkx library quick start guidePython networkx library quick start guide
Python networkx library quick start guide
 
Towards neuralprocessingofgeneralpurposeapproximateprograms
Towards neuralprocessingofgeneralpurposeapproximateprogramsTowards neuralprocessingofgeneralpurposeapproximateprograms
Towards neuralprocessingofgeneralpurposeapproximateprograms
 
NeuralProcessingofGeneralPurposeApproximatePrograms
NeuralProcessingofGeneralPurposeApproximateProgramsNeuralProcessingofGeneralPurposeApproximatePrograms
NeuralProcessingofGeneralPurposeApproximatePrograms
 
Tensorflow in practice by Engineer - donghwi cha
Tensorflow in practice by Engineer - donghwi chaTensorflow in practice by Engineer - donghwi cha
Tensorflow in practice by Engineer - donghwi cha
 
Machine Learning on Code - SF meetup
Machine Learning on Code - SF meetupMachine Learning on Code - SF meetup
Machine Learning on Code - SF meetup
 
Session 09 learning relationships.pptx
Session 09 learning relationships.pptxSession 09 learning relationships.pptx
Session 09 learning relationships.pptx
 
Session 09 learning relationships.pptx
Session 09 learning relationships.pptxSession 09 learning relationships.pptx
Session 09 learning relationships.pptx
 
Threading Is Not A Model
Threading Is Not A ModelThreading Is Not A Model
Threading Is Not A Model
 
Neural network
Neural networkNeural network
Neural network
 
A peek on numerical programming in perl and python e christopher dyken 2005
A peek on numerical programming in perl and python  e christopher dyken  2005A peek on numerical programming in perl and python  e christopher dyken  2005
A peek on numerical programming in perl and python e christopher dyken 2005
 
DSD-INT 2018 Work with iMOD MODFLOW models in Python - Visser Bootsma
DSD-INT 2018 Work with iMOD MODFLOW models in Python - Visser BootsmaDSD-INT 2018 Work with iMOD MODFLOW models in Python - Visser Bootsma
DSD-INT 2018 Work with iMOD MODFLOW models in Python - Visser Bootsma
 
Python for Scientific Computing -- Ricardo Cruz
Python for Scientific Computing -- Ricardo CruzPython for Scientific Computing -- Ricardo Cruz
Python for Scientific Computing -- Ricardo Cruz
 
Exceeding Classical: Probabilistic Data Structures in Data Intensive Applicat...
Exceeding Classical: Probabilistic Data Structures in Data Intensive Applicat...Exceeding Classical: Probabilistic Data Structures in Data Intensive Applicat...
Exceeding Classical: Probabilistic Data Structures in Data Intensive Applicat...
 
ScaleGraph - A High-Performance Library for Billion-Scale Graph Analytics
ScaleGraph - A High-Performance Library for Billion-Scale Graph AnalyticsScaleGraph - A High-Performance Library for Billion-Scale Graph Analytics
ScaleGraph - A High-Performance Library for Billion-Scale Graph Analytics
 
Introduction to Tensorflow
Introduction to TensorflowIntroduction to Tensorflow
Introduction to Tensorflow
 
Unsupervised program synthesis
Unsupervised program synthesisUnsupervised program synthesis
Unsupervised program synthesis
 
Python for Scientists
Python for ScientistsPython for Scientists
Python for Scientists
 
NSC #2 - D2 06 - Richard Johnson - SAGEly Advice
NSC #2 - D2 06 - Richard Johnson - SAGEly AdviceNSC #2 - D2 06 - Richard Johnson - SAGEly Advice
NSC #2 - D2 06 - Richard Johnson - SAGEly Advice
 
V design and implementation of network security using genetic algorithm
V design and implementation of network security using genetic algorithmV design and implementation of network security using genetic algorithm
V design and implementation of network security using genetic algorithm
 
Design and implementation of network security using genetic algorithm
Design and implementation of network security using genetic algorithmDesign and implementation of network security using genetic algorithm
Design and implementation of network security using genetic algorithm
 

More from Moses Boudourides

A bibliometric study on the literature of Open Science and Open Access. By Ts...
A bibliometric study on the literature of Open Science and Open Access. By Ts...A bibliometric study on the literature of Open Science and Open Access. By Ts...
A bibliometric study on the literature of Open Science and Open Access. By Ts...
Moses Boudourides
 
Boudourides: Analysis of Bibliometric Data of Publications on “Computational ...
Boudourides: Analysis of Bibliometric Data of Publications on “Computational ...Boudourides: Analysis of Bibliometric Data of Publications on “Computational ...
Boudourides: Analysis of Bibliometric Data of Publications on “Computational ...
Moses Boudourides
 
Closures and Attributes in Graphs: Shadows of (Dis)Assembled Networks. By Mos...
Closures and Attributes in Graphs: Shadows of (Dis)Assembled Networks. By Mos...Closures and Attributes in Graphs: Shadows of (Dis)Assembled Networks. By Mos...
Closures and Attributes in Graphs: Shadows of (Dis)Assembled Networks. By Mos...
Moses Boudourides
 
Experiments of Friedkin–Johnsen Social Influence on Graphs
Experiments of Friedkin–Johnsen Social Influence on GraphsExperiments of Friedkin–Johnsen Social Influence on Graphs
Experiments of Friedkin–Johnsen Social Influence on Graphs
Moses Boudourides
 
Transitions and Trajectories in Temporal Networks
Transitions and Trajectories in Temporal NetworksTransitions and Trajectories in Temporal Networks
Transitions and Trajectories in Temporal Networks
Moses Boudourides
 
Multilayerity within multilayerity? On multilayer assortativity in social net...
Multilayerity within multilayerity? On multilayer assortativity in social net...Multilayerity within multilayerity? On multilayer assortativity in social net...
Multilayerity within multilayerity? On multilayer assortativity in social net...
Moses Boudourides
 
Boudourides & Lenis, Distribution of Groups of Vertices Across Multilayer Net...
Boudourides & Lenis, Distribution of Groups of Vertices Across Multilayer Net...Boudourides & Lenis, Distribution of Groups of Vertices Across Multilayer Net...
Boudourides & Lenis, Distribution of Groups of Vertices Across Multilayer Net...
Moses Boudourides
 
Boudourides et al., Transitions and Trajectories in Temporal Networks with Ov...
Boudourides et al., Transitions and Trajectories in Temporal Networks with Ov...Boudourides et al., Transitions and Trajectories in Temporal Networks with Ov...
Boudourides et al., Transitions and Trajectories in Temporal Networks with Ov...
Moses Boudourides
 
Η Επιστήμη των Δικτύων: Μια Πολύ Σύντομη Εισαγωγική Παρουσίαση - 8 Οκτωβρίου ...
Η Επιστήμη των Δικτύων: Μια Πολύ Σύντομη Εισαγωγική Παρουσίαση - 8 Οκτωβρίου ...Η Επιστήμη των Δικτύων: Μια Πολύ Σύντομη Εισαγωγική Παρουσίαση - 8 Οκτωβρίου ...
Η Επιστήμη των Δικτύων: Μια Πολύ Σύντομη Εισαγωγική Παρουσίαση - 8 Οκτωβρίου ...
Moses Boudourides
 
Short version of Dominating Sets, Multiple Egocentric Networks and Modularity...
Short version of Dominating Sets, Multiple Egocentric Networks and Modularity...Short version of Dominating Sets, Multiple Egocentric Networks and Modularity...
Short version of Dominating Sets, Multiple Egocentric Networks and Modularity...
Moses Boudourides
 
The hidden rules and open secrets of corporate governance. Preliminary result...
The hidden rules and open secrets of corporate governance. Preliminary result...The hidden rules and open secrets of corporate governance. Preliminary result...
The hidden rules and open secrets of corporate governance. Preliminary result...
Moses Boudourides
 

More from Moses Boudourides (11)

A bibliometric study on the literature of Open Science and Open Access. By Ts...
A bibliometric study on the literature of Open Science and Open Access. By Ts...A bibliometric study on the literature of Open Science and Open Access. By Ts...
A bibliometric study on the literature of Open Science and Open Access. By Ts...
 
Boudourides: Analysis of Bibliometric Data of Publications on “Computational ...
Boudourides: Analysis of Bibliometric Data of Publications on “Computational ...Boudourides: Analysis of Bibliometric Data of Publications on “Computational ...
Boudourides: Analysis of Bibliometric Data of Publications on “Computational ...
 
Closures and Attributes in Graphs: Shadows of (Dis)Assembled Networks. By Mos...
Closures and Attributes in Graphs: Shadows of (Dis)Assembled Networks. By Mos...Closures and Attributes in Graphs: Shadows of (Dis)Assembled Networks. By Mos...
Closures and Attributes in Graphs: Shadows of (Dis)Assembled Networks. By Mos...
 
Experiments of Friedkin–Johnsen Social Influence on Graphs
Experiments of Friedkin–Johnsen Social Influence on GraphsExperiments of Friedkin–Johnsen Social Influence on Graphs
Experiments of Friedkin–Johnsen Social Influence on Graphs
 
Transitions and Trajectories in Temporal Networks
Transitions and Trajectories in Temporal NetworksTransitions and Trajectories in Temporal Networks
Transitions and Trajectories in Temporal Networks
 
Multilayerity within multilayerity? On multilayer assortativity in social net...
Multilayerity within multilayerity? On multilayer assortativity in social net...Multilayerity within multilayerity? On multilayer assortativity in social net...
Multilayerity within multilayerity? On multilayer assortativity in social net...
 
Boudourides & Lenis, Distribution of Groups of Vertices Across Multilayer Net...
Boudourides & Lenis, Distribution of Groups of Vertices Across Multilayer Net...Boudourides & Lenis, Distribution of Groups of Vertices Across Multilayer Net...
Boudourides & Lenis, Distribution of Groups of Vertices Across Multilayer Net...
 
Boudourides et al., Transitions and Trajectories in Temporal Networks with Ov...
Boudourides et al., Transitions and Trajectories in Temporal Networks with Ov...Boudourides et al., Transitions and Trajectories in Temporal Networks with Ov...
Boudourides et al., Transitions and Trajectories in Temporal Networks with Ov...
 
Η Επιστήμη των Δικτύων: Μια Πολύ Σύντομη Εισαγωγική Παρουσίαση - 8 Οκτωβρίου ...
Η Επιστήμη των Δικτύων: Μια Πολύ Σύντομη Εισαγωγική Παρουσίαση - 8 Οκτωβρίου ...Η Επιστήμη των Δικτύων: Μια Πολύ Σύντομη Εισαγωγική Παρουσίαση - 8 Οκτωβρίου ...
Η Επιστήμη των Δικτύων: Μια Πολύ Σύντομη Εισαγωγική Παρουσίαση - 8 Οκτωβρίου ...
 
Short version of Dominating Sets, Multiple Egocentric Networks and Modularity...
Short version of Dominating Sets, Multiple Egocentric Networks and Modularity...Short version of Dominating Sets, Multiple Egocentric Networks and Modularity...
Short version of Dominating Sets, Multiple Egocentric Networks and Modularity...
 
The hidden rules and open secrets of corporate governance. Preliminary result...
The hidden rules and open secrets of corporate governance. Preliminary result...The hidden rules and open secrets of corporate governance. Preliminary result...
The hidden rules and open secrets of corporate governance. Preliminary result...
 

Recently uploaded

RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
zuzanka
 
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGHKHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
shreyassri1208
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
Prof. Dr. K. Adisesha
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
TechSoup
 
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptxA Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
OH TEIK BIN
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
Kalna College
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
nitinpv4ai
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
سمير بسيوني
 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
Celine George
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
indexPub
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
David Douglas School District
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
Iris Thiele Isip-Tan
 
How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17
Celine George
 
Contiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptxContiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptx
Kalna College
 

Recently uploaded (20)

RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
 
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGHKHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
 
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptxA Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
 
How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17
 
Contiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptxContiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptx
 

Ανάλυση Δικτύων με το NetworkX της Python: Μια προκαταρκτική (αλλά ημιτελής ως το καλοκαίρι 2014) εισαγωγή

  • 1. Anˆlush DiktÔwn me to NetworkX thc Python Mwus c A. MpountourÐdhc Tm ma Majhmatik¸n PanepisthmÐou Pˆtrac mboudour@upatras.gr 22 NoembrÐou 2012 Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 2. PÐnakac Perieqomènwn 1 Python kai NetworkX 2 Eisagwg  Grˆfwn Mh Kateujunìmenoi Grˆfoi Kateujunìmenoi Grˆfoi Grˆfoi me Bˆrh Akm¸n DimereÐc Grˆfoi Qarakthristikˆ (Attributes) Kìmbwn kai Akm¸n TÔpoi Grˆfwn kai Sqesiak¸n Dedomènwn Genn torec Prokataskeuasmènwn Grˆfwn 3 Diktuakˆ Mètra BajmoÐ Kìmbwn Kentrikìthtec Kìmbwn Suntelest c Suss¸reushc kai Metabatikìthta Amoibaiìthta Apostˆseic Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 3. 4 DiktuakoÐ DiamerismoÐ Sunist¸sec kai KlÐkec k–Pur nec (k–Cores) Blockmodeling Koinìthtec (Communities) 5 Diktuakˆ Montèla Anameiximìthta (Assortativity) Epirro  kai Diˆqush DÐktua Mikr¸n Kìsmwn (Small–Worlds) DÐktua QwrÐc KlÐmaka (Scale–Free) Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 4. Python kai NetworkX H Python eÐnai mia ermhneutik  gl¸ssa, dhlad , ekteleÐtai qwrÐc na qreiˆzetai na perˆsei apì thn diadikasÐa thc sÔntaxhc. H Python diatÐjetai gia katèbasma (mazÐ me odhgÐec egkatˆstashc) gia ìla ta leitourgikˆ sust mata apì to http://www.python.org/download/. IdiaÐtera gia ta Windows sunistˆtai h ActivePython. To NetworkX eÐnai èna pakèto thc Python gia thn dhmiourgÐa kai ton qeirismì grˆfwn kai diktÔwn. To pakèto, h tekmhrÐwsh ki ˆlloi pìroi tou NetworkX eÐnai diajèsimoi sto http://networkx.lanl.gov/, ìpwc kai sthn apoj kh pakètwn thc Python PyPI. Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 5. Mia apeujeÐac (one–click) egkatˆstash thc Python, tou NetworkX ki ˆllwn monˆdwn thc Python mporeÐ na gÐnei apì thn dianom  thc Python Enthought, pou dÐnetai dwreˆn gia akadhmaðk  qr sh. Pollèc qr simec plhroforÐec gia thn egkatˆstash twn Python, NetworkX ki ˆllwn aparaÐthtwn upologistik¸n pìrwn dÐnontai sth selÐda twn Resources tou maj matoc Comp 200 tou PanepisthmÐou tou Rice. 'Oloi oi k¸dikec twn diafanei¸n ed¸ èqoun dokimasjeÐ pˆnw sthn èkdosh 2.7.3 thc Python kai thn èkdosh 1.7 tou NetworkX. Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 6. Sto prooÐmio thc graf c (script) ìlwn twn ekteloÔmenwn ed¸ kwdÐkwn thc Python ja prèpei na eisˆgontai oi ex c grammèc: import networkx as nx import matplotlib . pyplot as plt import pylab Sthn antigraf  ki epikìllhsh twn entol¸n pou dÐnontai sth sunèqeia prèpei na proseqjeÐ h stoÐqish stic allagèc gramm¸n, giatÐ h Python eÐnai euaÐsjhth wc proc thn autìmath topojèthsh esoq¸n (indentation). Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 7. Eisagwg  Grˆfwn Pr¸ta, dÐnontai oi entolèc gia mh kateujunìmenouc grˆfouc. Arqikˆ, dhmiourgeÐtai ènac kenìc grˆfoc: G = nx. Graph () Metˆ, eisˆgontai arqikˆ oi kìmboi, p.q., oi 5 kìmboi '1', '2', '3', '4' kai '5' mpaÐnoun wc ex c: G. add_nodes_from ([1,2,3,4,5]) Bèbaia, antÐ gia arijmoÔc, oi kìmboi mporoÔn na eisˆgontai wc onìmata   lèxeic, p.q.: G. add_nodes_from ([ 'John ', 'Mary ']) G. add_node (" London ") G. add_nodes_from ([ 'a','b','c','d','e']) Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 8. Tèloc, eisˆgontai oi akmèc, p.q., gia touc 5 kìmbouc 1–5 na 6 sundèseic: G. add_edges_from ([(1,2),(1,4),(2,3),(3,4),(3,5),(4,5 )]) Oi lÐstec kai to pl joc twn eisaqjèntwn kìmbwn kai akm¸n dÐnontai apì tic entolèc: G. nodes () G. number_of_nodes () G. edges () G. number_of_edges () Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 9. Gia to sqediasmì tou eisaqjèntoc grˆfou, p.q, tou paradeÐgmatoc autoÔ tou grˆfou me 5 kìmbouc kai 6 akmèc, ekteloÔntai oi entolèc: plt . figure () nx. draw (G) plt . show ( block = False ) H teleutaÐa entol  dèqetai diˆforec paramètrouc, ìpwc, p.q., gia diaforetikì tÔpo sqedÐou (layout), mègejoc kai qr¸ma kìmbwn kai afaÐresh twn onomˆtwn (ids) twn kìmbwn: nx. draw_spring (G, node_size =100 , node_color ='# A0CBE2 ', with_labels = False ) Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 10. ParaleÐpontac parametropoi seic, o sqediasmìc tou grˆfou tou paradeÐgmatoc dÐnei to sq ma: Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 11. Oi kìmboi mporoÔn na topotethjoÔn se stajerèc jèseic, efìson o grˆfoc eÐqe eisaqjeÐ me tic suntetagmènec touc, pou mporeÐ na gÐnei, p.q., sto parˆdeigma autì wc ex c: pos ={1:(0,0),2:(1,0),4:(0,1),3:(1,1),5:(0.5,2.0)} nx. draw (G, pos ) Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 12. Eisagwg  Kateujunìmenwn Grˆfwn GÐnetai wc ex c, p.q., sto parˆdeigma autì: G=nx. DiGraph () G. add_nodes_from (["A","B","C","D"]) G. add_edges_from ([( "A","B"), ("C","A"), ("C","B"), ("B","D")]) Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 13. Eisagwg  Grˆfwn me Bˆrh Akm¸n GÐnetai, p.q., sto parˆdeigma autì me tic entolèc: G=nx. Graph () G. add_weighted_edges_from ([( 'a','b',4),( 'a','c',8), ('a','d',5),( 'c','d',3)]) kai o sqediasmìc wc ex c: pos =nx. spring_layout (G) edge_labels = dict ([((u,v ,),d['weight ']) for u,v,d in G. edges ( data = True )]) nx. draw_networkx_nodes (G,pos , node_size = 700) nx. draw_networkx_edges (G, pos) nx. draw_networkx_labels (G,pos , font_size =20) nx. draw_networkx_edge_labels (G,pos , edge_labels = edge_labels , font_size =20) Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 14. Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 15. AntÐ thc parˆjeshc twn tim¸n twn bar¸n, oi akmèc mporoÔn na sqediasjoÔn me eÔrh anˆloga twn tim¸n twn bar¸n wc ex c: nx. draw_networkx_nodes (G,pos , node_size = 700) edgewidth =[] for (u,v,d) in G. edges ( data = True ): edgewidth . append (d['weight ']) nx. draw_networkx_edges (G,pos , edge_color ='b', width = edgewidth ) nx. draw_networkx_labels (G,pos , font_size =20) Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 16. Epiplèon, mporoÔn na krathjoÔn sto sqèdio mìno oi akmèc me bˆrh megalÔtera kˆpoiac endiˆmeshc tim c, p.q., 4: elarge = [(u,v) for (u,v,d) in G. edges ( data = True ) if d['weight '] >4] esmall = [(u,v) for (u,v,d) in G. edges ( data = True ) if d['weight '] <=4] nx. draw_networkx_edges (G,pos , edgelist = elarge , edge_color ='b',width = edgewidth ) nx. draw_networkx_edges (G,pos , edgelist = esmall , width =6, alpha =0.5, edge_color ='g',style ='dashed ') Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 17. Eisagwg  Dimer¸n Grˆfwn H eisagwg  dimer¸n grˆfwn gÐnetai ìpwc, p.q., sto parakˆtw parˆdeigma: from networkx . algorithms import bipartite G = nx. Graph () G. add_nodes_from ([1,2,3,4], bipartite =0) G. add_nodes_from ([ 'a','b','c'], bipartite =1) G. add_edges_from ([(1,'a'),(1,'b'),(2,'a'),(2,'b'), (2,'c'),(3,'c'),(4,'b'),(4,'c')]) pos ={1:(0,0), 2:(0,1), 3:(0,2), 4:(0,3), 'a':(1,0.5), 'b':(1,1.5), 'c':(1,2.5)} O èlegqoc an prìkeitai perÐ dimeroÔc grˆfou (True)   ìqi (False) gÐnetai me thn entol : print bipartite . is_bipartite (G) True Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 18. O sqediasmìc tou dimeroÔc grˆfou gÐnetai wc ex c: mode1 , mode2 = bipartite . sets (G) nx. draw_networkx_nodes (G,pos , nodelist = list ( mode1 ), node_color ='b',node_size = 700) nx. draw_networkx_nodes (G,pos , nodelist = list ( mode2 ), node_color ='g',node_size = 700) nx. draw_networkx_edges (G, pos) nx. draw_networkx_labels (G,pos , font_size =20 , font_color ='# FFFFFF ') plt . axis ('off ') Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 19. Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 20. Qarakthristikˆ (Attributes) Kìmbwn kai Akm¸n Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 21. TÔpoi Grˆfwn kai Sqesiak¸n Dedomènwn Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 22. Genn torec Prokataskeuasmènwn Grˆfwn Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 23. BajmoÐ Kìmbwn Pr¸ta, gia mh kateujunìmenouc grˆfouc: O grˆfoc G = (V, E) sto sÔnolo koruf¸n V eÐnai mh kateujunìmenoc, ìtan to sÔnolo twn akm¸n tou E eÐnai èna summetrikì uposÔnolo tou V V. GeÐtonec kìmbwn: Gia duo korufèc i, j 2 V tou G, h j lègetai geÐtonac thc i ìtan (i, j) 2 E. G. nodes () # List of nodes G. number_of_nodes () # Number of nodes len (G) # Number of nodes G. order () # Number of nodes G. number_of_edges () # Number of of edges G. neighbors (1) # Neighbors of node 1 ## To get the list of neighbors of all nodes : for node in G. nodes (): print node , G. neighbors ( node ) PÐnakac GeitnÐashc (Adjacency Matrix): EÐnai ènac (summetrikìc) pÐnakac A = fAgi,j2V tˆxhc jVj jVj tètoioc ¸ste A = 1, ìtan i, j geÐtonec, A = 0, diaforetikˆ. A = nx. to_numpy_matrix (G) Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 24. BajmoÐ kìmbwn: Sto mh kateujunìmeno grˆfo G, o bajmìc miac koruf c i, pou sumbolÐzetai wc ki, orÐzetai san to pl joc twn geitìnwn tou i, dhlad , to pl joc twn sundèsewn pou prospÐptoun sto i. Profan¸c, isqÔei: ki = X j2V A = X i2V A ki, epiplèon, X i2V ki = X i,j2V A = 2jEj G. degree (1) # Degree of node 1 len (G. neighbors (1) # Degree of node 1 G. degree () # List of degrees of all nodes ## To get the table of degrees of all nodes : for node in G. nodes (): print node , G. degree ( node ) Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 25. BajmoÐ Kìmbwn Kateujunìmenwn Grˆfwn 'Estw o kateujunìmenoc grˆfoc G = (V, E) sto sÔnolo koruf¸n V, ìpou t¸ra to sÔnolo twn akm¸n tou E eÐnai èna mh summetrikì uposÔnolo tou V V ki o antÐstoiqoc pÐnakac geitnÐashc A = fAg eÐnai mh summetrikìc. O bajmìc eisìdou thc koruf c i tou G, pou sumbolÐzetai wc kin i , orÐzetai san to pl joc twn sundèsewn pou xekinoÔn apì geÐtonec tou i kai kateujÔnontai proc ton i, dhlad , kin i = X j2V A O bajmìc exìdou thc koruf c i tou G, pou sumbolÐzetai wc kout i , orÐzetai san to pl joc twn sundèsewn pou xekinoÔn apì ton i kai kateujÔnontai proc geÐtonec tou i, dhlad , kout i = X i2V A Profan¸c, isqÔei: X i2V kin i = X j2V kout i = X i,j2V A = jEj G. in_degree (1) #In - Degree of node 1 G. out_degree (1) #Out - Degree of node 1 G. in_degree () # List of in - degrees of all nodes G. out_degree () # List of out - degrees of all nodes ## To get the table of in - degrees and out - degrees of all nodes : for node in G. nodes (): print node , G. in_degree ( node ), G. out_degree ( node ) Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 26. Katanomèc Bajm¸n Istìgramma katanom c bajm¸n (gia mh kateujunìmeno grˆfo): degrees = G. degree () values = sorted ( set ( degrees . values ())) hist = [ degrees . values (). count (x) for x in values ] fig = plt . figure () ax = fig . add_subplot ( 111 ) plt . plot ( values ,hist ,'ro -') #ax . set_xscale (' log ') # Logarithmic x scale #ax . set_yscale (' log ') # Logarithmic y scale plt . title ( Degree Distribution ) plt . xlabel ('Degree ') plt . ylabel ('Number of nodes ') Istìgramma katanom c bajm¸n (gia kateujunìmeno grˆfo): ## in_degrees = G. in_degree () in_values = sorted ( set ( in_degrees . values ())) in_hist = [ in_degrees . values (). count (x) for x in in_values ] out_degrees = G. out_degree () out_values = sorted ( set ( out_degrees . values ())) out_hist = [ out_degrees . values (). count (x) for x in out_values ] fig = plt . figure () ax = fig . add_subplot ( 111 ) plt . plot ( in_values , in_hist ,'ro -') plt . plot ( out_values , out_hist ,'bv -') #ax . set_xscale (' log ') # Logarithmic x scale #ax . set_yscale (' log ') # Logarithmic y scale plt . titke (In - Degree Out - Degree Distributions ) plt . xlabel ('Degree ') plt . ylabel ('Number of nodes ') Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 27. Parˆdeigma: To dÐktuo karˆte G = nx. karate_club_graph () Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 28. Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 29. Kentrikìthtec Kìmbwn: 1. Kentrikìthta BajmoÔ (Degree Centrality) Oi orismoÐ OLWN twn kentrikìthtwn pou ja d¸soume ed¸ kai sth sunèqeia aforoÔn mh kateujunìmenouc (aploÔc) grˆfouc. H kentrikìthta bajmoÔ (degree centrality) xi tou kìmbou i isoÔtai proc ton bajmì ki tou kìmbou autoÔ: xi = ki x8 = 5 Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 30. 2. Kentrikìthta Endiamesìthtac (Betweenness Centrality) H kentrikìthta endiamesìthtac (betweenness centrality) xi tou kìmbou i isoÔtai proc: xi = X s6=i6=t2V nist gst ìpou nist eÐnai to pl joc twn gewdaitik¸n diadrom¸n metaxÔ twn kìmbwn s kai t, pou pernoÔn apì ton kìmbo i, kai gst eÐnai to sunolikì pl joc twn gewdaitik¸n diadrom¸n metaxÔ twn kìmbwn s kai t. n23 ,23 = 2 g3,23 = 4 x2 = 0.1436 Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 31. 3. Kentrikìthta EggÔthtac (Closeness Centrality) H kentrikìthta eggÔthtac (closeness centrality) xi tou kìmbou i isoÔtai proc: xi = n P j2V d ìpou n eÐnai to pl joc twn kìmbwn tou grˆfou kai d h gewdaitik  apìstash apì ton kìmbo i proc opoiod pote ˆllo kìmbo j. x0 = 0.5689 x2 = 0.5593 x33 = 0.55 x31 = 0.5409 Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 32. 4. Kentrikìthta IdiodianÔsmatoc (Eigenvector Centrality) H kentrikìthta idiodianÔsmatoc (eigenvector centrality) xi tou kìmbou i isoÔtai proc: xi = 1 1 X j2V Axj ìpou A eÐnai o pÐnakac geitnÐashc (adjacency matrix) tou grˆfou kai xi eÐnai oi sunist¸sec tou idiadianÔsmatoc tou A, pou antistoiqoÔn sth megalÔterh idiotim  tou 1. x33 = 0.3734 x0 = 0.3555 x2 = 0.3172 x32 = 0.3086 Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 33. Upologismìc Kentrikìthtwn Entolèc NetworkX: nx. degree_centrality (G) nx. betweenness_centrality (G) nx. closeness_centrality (G) nx. eigenvector_centrality (G) EktÔpwsh se pÐnaka: centralities = [] centralities . append (nx. degree_centrality (G )); centralities . append (nx. betweenness_centrality (G )); centralities . append (nx. closeness_centrality (G)); centralities . append (nx. eigenvector_centrality (G )); for node in G. nodes_iter (): measures = (t). join ( map ( lambda f: str(f[ node ]), centralities )) print %s %s % (node , measures ) Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 34. Parˆdeigma: To dÐktuo Karˆte G = nx. karate_club_graph () Nodes Degree C. Betweenness C. Closeness C. Eigenvector C. 0 0.484848485 0.437635281 0.568965517 0.355490721 1 0.272727273 0.053936688 0.485294118 0.265959605 2 0.303030303 0.143656806 0.559322034 0.317192417 3 0.181818182 0.011909271 0.464788732 0.211179694 4 0.090909091 0.000631313 0.379310345 0.075968879 5 0.121212121 0.029987374 0.38372093 0.079483113 6 0.121212121 0.029987374 0.38372093 0.079483113 7 0.121212121 0 0.44 0.170959892 8 0.151515152 0.055926828 0.515625 0.227404355 9 0.060606061 0.000847763 0.434210526 0.102674504 10 0.090909091 0.000631313 0.379310345 0.075968879 11 0.03030303 0 0.366666667 0.052855817 12 0.060606061 0 0.370786517 0.084254727 13 0.151515152 0.045863396 0.515625 0.226473112 14 0.060606061 0 0.370786517 0.10140365 15 0.060606061 0 0.370786517 0.10140365 16 0.060606061 0 0.284482759 0.023635566 17 0.060606061 0 0.375 0.092399699 18 0.060606061 0 0.370786517 0.10140365 19 0.090909091 0.032475048 0.5 0.147912918 20 0.060606061 0 0.370786517 0.10140365 21 0.060606061 0 0.375 0.092399699 22 0.060606061 0 0.370786517 0.10140365 23 0.151515152 0.017613636 0.392857143 0.150118912 24 0.090909091 0.002209596 0.375 0.057052326 25 0.090909091 0.003840488 0.375 0.059206342 26 0.060606061 0 0.362637363 0.075579616 27 0.121212121 0.022333454 0.458333333 0.133477386 28 0.090909091 0.001794733 0.452054795 0.131077964 29 0.121212121 0.002922078 0.38372093 0.134961122 30 0.121212121 0.014411977 0.458333333 0.174758637 31 0.181818182 0.138275613 0.540983607 0.191034394 32 0.363636364 0.145247114 0.515625 0.308643749 33 0.515151515 0.304074976 0.55 0.373362539 Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 35. Kentrikìthta Mikr  tim  Megˆlh tim  Degree LÐgoi geÐtonec (sundèseic) PolloÐ geÐtonec (sundèseic) Betweenness Mikrìc èlegqoc ro c Megˆloc èlegqoc ro c Closeness Proc thn perifèreia Proc to kèntro Eigenvector LÐgoi   lÐgo shmantikoÐ geÐtonec PolloÐ   polÔ shmantikoÐ geÐtonec To dÐktuo twn stratiwtik¸n tou David Krackhardt: Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 36. Suntelest c Suss¸reushc O suntelest c suss¸reushc (clustering coefficient) Ci tou kìmbou i orÐzetai wc: Ci = 2i ki(ki 1) , ìpou i eÐnai to pl joc twn sundèsewn metaxÔ twn geitonik¸n kìmbwn tou i kai d i proc opoiod pote ˆllo kìmbo ki eÐnai to pl joc twn geitonik¸n kìmbwn tou i. nx. clustering (G) # Clustering coefficients of all nodes nx. clustering (G,n) # Clustering coefficient of node n C23 = 2 4 5 4 = 0.4 Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 37. Diktuak  Metabatikìthta O sunolikìc suntelest c suss¸reushc (global clustering coefficient) (ìlou) tou grˆfou G orÐzetai wc h mèsh tim  twn suntelest¸n suss¸reushc twn kìmbwn tou: C(G) = 1 jVj X i Ci H metabatikìthta (transitivity) tou grˆfou G orÐzetai wc to phlÐko: T(G) = pl joc trig¸nwn pl joc sundedemènwn triˆdwn nx. average_clustering (G) # Graph clustering coefficient nx. transitivity (G) # Graph transitivity C(G) = 0.16 T(G) = 0.19 Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 38. Amoibaiìthta Sundèsewn se Kateujunìmeno Grˆfo Se ènan kateujunìmeno grˆfo, o suntelest c amoibaiìthtac sundèsewn/desm¸n (link/tie mutuality coefficient) orÐzetai wc ex c: M(G) = pl joc antapodidìmenwn sundèsewn pl joc ìlwn twn sundèsewn/tìxwn G. to_undirected ( True ). size () # Reciprocated edges G. number_of_edges () # Total edges Er(G) = 64 E(G) = 195 M(G) = 0.3282 Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 39. Apostˆseic Se ènan grˆfo G, gia kˆje duo kìmbouc i, j, h (gewdaitik ) apìstas  touc d(i, j) orÐzetai wc to m koc thc suntomìterhc diadrom c apì to i sto j, efìson oi kìmboi autoÐ eÐnai sundedemènoi, en¸ d(i, j) = 1, diaforetikˆ (kai fusikˆ, d(i, i) = 0). (H ‘‘suntomìterh diadrom ’’ metaxÔ duo kìmbwn eÐnai h diadrom  pou èqei to elˆqisto m koc anˆmesa se ìlec tic diadromèc metaxÔ twn duo kìmbwn.) To mèso m koc suntomìterhc diadrom c (average shortest path length) orÐzetai wc ex c: a = 1 jVj(jVj 1) X i,j2V d(i, j) a = nx. average_shortest_path_length (G) a = 2.4082 Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 40. Mètra Diˆforwn Empeirik¸n DiktÔwn TABLE I. The general characteristics of several real networks. For each network we indicated the number of nodes, the average degree !k, the average path length ! and the clustering coefficient C. For a comparison we have included the average path length !rand and clustering coefficient Crand of a random graph with the same size and average degree. The last column identifies the symbols in Figs. 8 and 9. Network Size !k ! !rand C Crand Reference Nr. WWW, site level, undir. 153, 127 35.21 3.1 3.35 0.1078 0.00023 Adamic 1999 Internet, domain level 3015 - 6209 3.52 - 4.11 3.7 - 3.76 6.36 - 6.18 0.18 - 0.3 0.001 Yook et al. 2001a, Pastor-Satorras et al. 2001 Movie actors 225, 226 61 3.65 2.99 0.79 0.00027 Watts, Strogatz 1998 LANL coauthorship 52, 909 9.7 5.9 4.79 0.43 1.8 × 10−4 Newman 2001a,b MEDLINE coauthorship 1, 520, 251 18.1 4.6 4.91 0.066 1.1 × 10−5 Newman 2001a,b SPIRES coauthorship 56, 627 173 4.0 2.12 0.726 0.003 Newman 2001a,b,c NCSTRL coauthorship 11, 994 3.59 9.7 7.34 0.496 3 × 10−4 Newman 2001a,b Math coauthorship 70, 975 3.9 9.5 8.2 0.59 5.4 × 10−5 Barab´asi et al. 2001 Neurosci. coauthorship 209, 293 11.5 6 5.01 0.76 5.5 × 10−5 Barab´asi et al. 2001 E. coli, substrate graph 282 7.35 2.9 3.04 0.32 0.026 Wagner, Fell 2000 10 E. coli, reaction graph 315 28.3 2.62 1.98 0.59 0.09 Wagner, Fell 2000 11 Ythan estuary food web 134 8.7 2.43 2.26 0.22 0.06 Montoya, Sol´e 2000 12 Silwood park food web 154 4.75 3.40 3.23 0.15 0.03 Montoya, Sol´e 2000 13 Words, cooccurence 460.902 70.13 2.67 3.03 0.437 0.0001 Cancho, Sol´e 2001 14 Words, synonyms 22, 311 13.48 4.5 3.84 0.7 0.0006 Yook et al. 2001 15 Power grid 4, 941 2.67 18.7 12.4 0.08 0.005 Watts, Strogatz 1998 16 C. Elegans 282 14 2.65 2.25 0.28 0.05 Watts, Strogatz 1998 17 TABLE II. The scaling exponents characterizing the degree distribution of several scale-free networks, for which P(k) follows a power-law (2). We indicate the size of the network, its average degree !k and the cutoff for the power-law scaling. For directed networks we list separately the indegree (#in) and outdegree (#out) exponents, while for the undirected networks, marked with a star, these values are identical. The columns lreal , lrand and lpow compare the average path length of real networks with power-law degree distribution and the prediction of random graph theory (17) and that of Newman, Strogatz and Watts (2000) (62), as discussed in Sect. V. The last column identifies the symbols in Figs. 8 and 9. Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 41. Sunist¸sec kai KlÐkec Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 42. Sunist¸sec kai KlÐkec Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 43. Blockmodeling Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 44. Koinìthtec (Communities) Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 45. Anameiximìthta (Assortativity) Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 46. Epirro  kai Diˆqush Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 47. DÐktua Mikr¸n Kìsmwn (Small–Worlds) Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python
  • 48. DÐktua QwrÐc KlÐmaka (Scale–Free) Mwus c A. MpountourÐdhc Anˆlush DiktÔwn me to NetworkX thc Python