SlideShare a Scribd company logo
Lecture 4:
Network Measures
CS 765: Complex Networks
Slides are modified from Networks: Theory and Application by Lada Adamic
Characterizing networks:
Is everything connected?
2
Network metrics: components
๏ฎ If there is a path from every vertex in a network to every
other, the network is connected
๏ฎ otherwise, it is disconnected
๏ฎ Component: A subset of vertices such that there exist at
least one path from each member of the subset to others
and there does not exist another vertex in the network
which is connected to any vertex in the subset
๏ฎ Maximal subset
๏ฎ A singeleton vertex that is not connected to any other
forms a size one component
๏ฎ Every vertex belongs to exactly one component
3
Connectedness
4
network metrics: size of giant component
๏ฎ if the largest component encompasses a significant fraction of the graph,
it is called the giant component
5
components in directed networks
A
B
C
D
E
F
G
H
Weakly connected components
A B C D E
G H F
6
๏ฎ Strongly connected components
๏ฎ Each node within the component can be reached from every other node
in the component by following directed links
Strongly connected components
B C D E
A
G H
F
๏ฎ Weakly connected components:
๏ฎ every node can be reached from every other node by following links in
either direction
A
B
C
D
E
F
G
H
components in directed networks
๏ฎ Every strongly connected component of more than one
vertex has at least one cycle
๏ฎ Out-component: set of all vertices that are reachable
via directed paths starting at a specific vertex v
๏ฎ Out-components of all members of a strongly
connected component are identical
๏ฎ In-component: set of all vertices from which there is a
direct path to a vertex v
๏ฎ In-components of all members of a strongly connected
component are identical
7
A
B
C
D
E
F
G
H
bowtie model of the web
๏ฎ The Web is a directed graph:
๏ฎ webpages link to other webpages
๏ฎ The connected components tell us what set of pages can
be reached from any other just by surfing
๏ฎ no โ€˜jumpingโ€™ around by typing in a URL or using a search engine
๏ฎ Broder et al. 1999 โ€“ crawl of over 200 million pages and
1.5 billion links.
๏ฎ SCC โ€“ 27.5%
๏ฎ IN and OUT โ€“ 21.5%
๏ฎ Tendrils and tubes โ€“ 21.5%
๏ฎ Disconnected โ€“ 8%
8
Characterizing networks:
How far apart are things?
9
Network metrics: paths
๏ฎ A path is any sequence of vertices such that every
consecutive pair of vertices in the sequence is
connected by an edge in the network.
๏ฎ For directed: traversed in the correct direction for the edges.
๏ฎ path can visit itself (vertex or edge) more than once
๏ฎ Self-avoiding paths do not intersect themselves.
๏ฎ Path length r is the number of edges on the path
๏ฎ Called hops
10
Paths
๏ฎ A path between nodes i0 and in is an ordered list
of n links P = {(i0, i1), (i1, i2), (i2, i3), ... ,(in-1, in)}.
๏ฎ The length of the path is n.
๏ฎ The path shown in orange in (a) follows the route
1โ†’2โ†’5โ†’7โ†’4โ†’6, hence its length is n = 5
๏ฎ The shortest paths between nodes 1 and 7, or the
distance d17, correspond to the path with the fewest
number of links that connect nodes 1 to 7.
๏ฎ There can be multiple paths of the same length, as illustrated by
the two paths shown in orange and grey.
๏ฎ The network diameter is the largest distance
in the network
๏ฎ being dmax = 3 here.
Independent paths
๏ฎ Edge independent paths: if they share no common edge
๏ฎ Vertex independent paths: if they share no common
vertex except start and end vertices
๏ฎ Vertex-independent => Edge-independent
๏ฎ Also called disjoint paths
๏ฎ These set of paths are not necessarily unique
๏ฎ Connectivity of vertices: the maximal number of
independent paths between a pair of vertices
๏ฎ Used to identify bottlenecks and resiliency to failures
12
Cut Sets and Maximum Flow
๏ฎ A minimum cut set is the smallest cut set that will
disconnect a specified pair of vertices
๏ฎ Need not to be unique
๏ฎ Mengerโ€™s theorem: If there is no cut set of size less than
n between a pair of vertices, then there are at least n
independent paths between the same vertices
๏ฎ Implies that the size of min cut set is equal to maximum number
of independent paths
๏ฎ for both edge and vertex independence
๏ฎ Maximum Flow between a pair of vertices is the number
of edge independent paths times the edge capacity
13
Network metrics: paths
๏ฎ
14
Network metrics: shortest paths
๏ฎ
A
B
C
D
E
1
2
2
3
3
15
3
Structural metrics:
Average path length
16
1 โ‰ค L โ‰ค D โ‰ค N-1
shortest paths
๏ฎ <d> = 0.35 + 2.06 log(N)
๏ฎ prediction: <d> = 17.5 for 200 million nodes
๏ฎ actual: <d> = 16 for reachable pairs
0 2 4 6 8 10
x 10
4
0
5
10
15
20
25
average
shortest
path
number of webpages
Paths
18
path Shortest path Diameter
Average path length Cycle Eulerian path Hamiltonian path
Node degree
๏ฎ Outdegree =
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 0 0 0 1
1 1 0 0 0
A =
๏ƒฅ
๏€ฝ
n
j
ij
A
1
example: outdegree for node 3 is 2, which
we obtain by summing the number of non-
zero entries in the 3rd
row
๏ฎ Indegree =
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 0 0 0 1
1 1 0 0 0
A =
๏ƒฅ
๏€ฝ
n
i
ij
A
1
example: the indegree for node 3 is 1,
which we obtain by summing the number of
non-zero entries in the 3rd
column
๏ƒฅ
๏€ฝ
n
i
i
A
1
3
๏ƒฅ
๏€ฝ
n
j
j
A
1
3
1
2
3
4
5
19
Node degrees
๏ฎ
20
๏ƒฅ
๏€ฝ
๏€ฝ
n
i
i
k
L
1
2
1
๏ƒฅ
๏ƒฅ ๏€ฝ
๏€ฝ
๏€ฝ
๏€ฝ
n
i
out
i
n
i
in
i k
k
L
1
1
Degree sequence and Degree frequency
๏ฎ Degree sequence: An ordered list of the (in,out) degree of each node
๏ฎ In-degree sequence:
๏ฎ [2, 2, 2, 1, 1, 1, 1, 0]
๏ฎ Out-degree sequence:
๏ฎ [2, 2, 2, 2, 1, 1, 1, 0]
๏ฎ (undirected) degree sequence:
๏ฎ [3, 3, 3, 2, 2, 1, 1, 1]
๏ฎ Degree frequency: A frequency count of the occurrence of each degree
In-degree frequency:
[(2,3) (1,4) (0,1)]
Out-degree frequency :
[(2,4) (1,3) (0,1)]
(undirected) frequency :
[(3,3) (2,2) (1,3)]
0 1 2
0
1
2
3
4
5
indegree
frequency
21
Degree distribution
๏ฎ The degree distribution is a function P(k), which gives
the probability of a randomly chosen node from the
graph having degree k
22
In-degree 0 1 2 3
Frequency 1 4 3 0
Distribution 0.13 0.50 0.38 0.00
Out-degree 0 1 2 3
Frequency 1 3 4 0
Distribution 0.13 0.38 0.50 0.00
Degree 0 1 2 3
Frequency 0 3 2 3
Distribution 0.00 0.38 0.25 0.38
Structural Metrics: Degree distribution
23
Degree Distribution Plot
The -axis represents the degree and the -axis
represents the fraction of nodes having that
degree
๏ฎOn social networking sites
There exist many users with few
connections and there exist a
handful of users with very large
numbers of friends.
Facebook
Degree Distribution
Degree distributions
๏ฎ Imagine I have a graph with 1000 nodes, but no links.
Now I start adding links randomly, one by one.
๏ฎ After 10 random additions, what do you expect the degree
distribution to be?
๏ฎ What will the average node degree be after 1000 additions?
๏ฎ The standard situation in a network where links are
added completely at random.
๏ฎ If there are n nodes, and m edges randomly added, then the
peak of this is at 2m/n, the average degree.
๏ฎ For a randomly picked node, the most likely degree is the
average one.
๏ฎ The probabilities then drop quickly either side.
P(k)
0
0.05
0.1
0.15
0.2
0.25
0.3
1.00
3.00
5.00
7.00
9.00
11.00
13.00
15.00
17.00
Degree Distributions
26
Protein interactions of yeast
degree distribution
๏ฎ indegree, a ~ 2.1
๏ฎ outdegree, a ~ 2.4
source: Pennock et al.: Winners don't take all: Characterizing the competition for links on the web
PNAS April 16, 2002 vol. 99 no. 8 5207-5211
Characterizing networks:
How dense are they?
network metrics: graph density
๏ฎ Of the connections that may exist between n nodes
๏ฎ directed graph
Lmax = n*(n-1)
๏ฎ undirected graph
Lmax = n*(n-1)/2
๏ฎ What fraction are present?
๏ฎ density = L / Lmax
๏ฎ In real networks L << Lmax
๏ฎ For example, out of 12 possible connections,
this graph has 7, giving it a density of 7/12 = 0.583
29
Graph density
30
๏ฎ Would this measure be useful for comparing networks of
different sizes (different numbers of nodes)?
๏ฎ As n โ†’ โˆž, a graph whose density reaches
๏ฎ 0 is a sparse graph
๏ฎ a constant is a dense graph
Transitivity
๏ฎ ๏ฏ is said to be transitive if a ๏ฏ b and b ๏ฏ c together
imply a ๏ฏ c
๏ฎ Perfect transitivity in network โ†’ cliques
๏ฎ Partial transitivity
๏ฎ u knows v and v knows w โ†’
=
31
Local Clustering Coefficient
๏ฎ Clustering coefficient measures transitivity in
undirected graphs
๏ฎ Local clustering coefficient measures transitivity at the
node level
๏ฎ Commonly employed for undirected graphs
๏ฎ Computes how strongly neighbors of a node (nodes
adjacent to ) are themselves connected
In an undirected graph, the
denominator can be rewritten as:
Local Clustering Coefficient: Example
๏ฎ Thin lines depict connections to neighbors
๏ฎ Dashed lines are the missing connections among
neighbors
๏ฎ Solid lines indicate connected neighbors
๏ฎ When all neighbors are connected
๏ฎ When none of neighbors are connected
Clustering Coefficient
๏ฎ
34
Structural Metrics:
Clustering coefficient
35
Clustering Coefficient and Triples
๏ฎ Triple: an ordered set of three nodes,
๏ฎ connected by two (open triple) edges or
๏ฎ three edges (closed triple)
๏ฎ A triangle can miss any of its three edges
๏ฎ A triangle has 3 Triples
and are different triples
โ€ข The same members
โ€ข First missing edge and second missing
and are the same triple
[Global] Clustering Coefficient
๏ฎ Count paths of length two and check whether the third edge
exists
When counting triangles, since every triangle has 6
closed paths of length 2
Or we can rewrite it as
[Global] Clustering Coefficient: Example
โ€ข Average clustering coefficient and global clustering
coefficient are different
โ€ข In some extreme cases they could differ
considerably
Clustering
39
clustering & motifs
๏ฎ clustering coefficient ~ 0.11 (at the site level)
Source: Milo et al., โ€œSuperfamilies of evolved and designed networksโ€, Science 303 (5663), p. 1538-1542, 2004.
41
Local Clustering and Redundancy
๏ฎ Redundancy
42
Reciprocity
If you become my friend, Iโ€™ll be yours
๏ฎ Reciprocity is simplified version of
transitivity
๏ฎ It considers closed loops of length 2
๏ฎ If node is connected to node ,
๏ฎ by connecting to , exhibits reciprocity
Reciprocity
๏ฎ How likely is it that the node you point to will point to you
as well.
44
Reciprocity: Example
Reciprocal nodes:
Cocitation and Bibliographic coupling
๏ฎ Cocitation of two vertices i and j is the number of
vertices that have outgoing edges to both
๏ฎ Bibliographic coupling is the number of vertices to
which both point
46
Signed Edges and Structural balance
๏ฎ Friends / Enemies
๏ฎ Friend of friend โ†’
๏ฎ Enemy of my enemy โ†’
๏ฎ Structural balance: only loops of even number of
โ€œnegative linksโ€
๏ฎ Structurally balanced โ†’ partitioned into groups where
internal links are positive and between group links are
negative
47
Social Balance Theory
๏ฎ Consistency in friend/foe relationships among individuals
๏ฎ Informally, friend/foe relationships are consistent when
๏ฎ In the network
๏ฎ Positive edges demonstrate friendships ()
๏ฎ Negative edges demonstrate being enemies ()
๏ฎ Triangle of nodes , and , is balanced, if and only if
๏ฎ denotes the value of the edge between nodes and
Social Balance Theory: Possible Combinations
For any cycle if the multiplication of edge values become positive,
then the cycle is socially balanced
50
Keith Collins, Loubna Mrie - Quartz
Similarity
๏ฎ What interaction patterns are common?
๏ฎ Reciprocity and Transitivity
๏ฎ Balance and Status
๏ฎ Who are the like-minded users and how can we
find these similar individuals?
๏ฎ Similarity
๏ฎ Who are the central figures (influential nodes) in
the network?
๏ฎ Centrality
Structural Equivalence
๏ฎ Structural Equivalence:
๏ฎ We look at the neighborhood shared by two
nodes;
๏ฎ The size of this shared neighborhood defines how
similar two nodes are.
๏ฎ Example:
๏ฎ Two brothers have in common
๏ฎ sisters, mother, father, grandparents, etc.
๏ฎ This shows that they are similar
๏ฎ Vertex similarity:
๏ฎ The neighborhood often excludes the node itself
๏ฎ Issue?
๏ฎ Connected nodes not sharing a neighbor will be assigned zero similarity
๏ฎ Solution:
๏ฎ We can assume nodes are included in their neighborhoods
Structural Equivalence: Definitions
Jaccard Similarity:
Cosine Similarity:
Normalize?
Similarity: Example
Similarity Significance
Measuring Similarity Significance: compare the
calculated similarity value with its expected value
where vertices pick their neighbors at random
๏ฎ For vertices and with degrees and this
expectation is
๏ฎ There is a chance of becoming โ€˜s neighbor
๏ฎ selects neighbors
๏ฎ We can rewrite neighborhood overlap as
Normalized Similarity, cont.
Normalized Similarity, cont.
times the Covariance between and
Normalize the covariance by the multiplication of Variances
We get Pearson correlation coefficient
(range of ๏ณ ๏ƒŽ [-1,1] )
Similarity
๏ฎ Structural Equivalence: share many of the same
neighbors
๏ฎ Jaccard Similarity:
๏ฎ Cosine Similarity:
๏ฎ Pearson Coefficient: Given degree of two nodes, how many
common neighbors they have ()
๏ฎ Euclidian Distance:
๏ฎ Regular Equivalence: neighbors are the same
๏ฎ Katz Similarity:
58
Regular Equivalence
๏ฎ In regular equivalence,
๏ฎ We do not look at
neighborhoods shared between
individuals, but
๏ฎ How neighborhoods
themselves are similar
๏ฎ Example:
๏ฎ Athletes are similar not because
they know each other in person,
but since they know similar
individuals, such as coaches,
trainers, other players, etc.
โ€ข , are similar when their neighbors and are
similar
Regular Equivalence
Regular Equivalence
๏ฎ and are similar when is similar to โ€™s
neighbors
๏ฎ In vector format
A vertex is highly similar
to itself, we guarantee
this by adding an identity
matrix to the equation
W the matrix is invertible
Regular Equivalence: Example
๏ฎ Any row/column of this matrix shows the similarity to other vertices
๏ฎ Vertex 1 is most similar (other than itself) to vertices 2 and 3
๏ฎ Nodes 2 and 3 have the highest similarity (regular equivalence)
The largest eigenvalue of is 2.43
Set
Homophily and Assortative Mixing
๏ฎ Assortativity: Tendency to be linked with nodes that are
similar in some way
๏ฎ Humans: age, race, nationality, language, income, education
level, etc.
๏ฎ Citations: similar fields than others
๏ฎ Web-pages: Language
๏ฎ Disassortativity: Tendency to be linked with nodes that
are different in some way
๏ฎ Network providers: End users vs other providers
๏ฎ Assortative mixing can be based on
๏ฎ Enumerative characteristic
๏ฎ Scalar characteristic
63
Assortativity: An Example
๏ฎ The friendship network in a US
high school in 1994
๏ฎ Colors represent races,
๏ฎ White: whites
๏ฎ Grey: blacks
๏ฎ Light Grey: hispanics
๏ฎ Black: others
๏ฎ High assortativity between
individuals of the same race
Assortativity Significance
๏ฎ Assortativity significance
๏ฎ The difference between measured assortativity and expected
assortativity
๏ฎ The higher this difference, the more significant the assortativity
observed
๏ฎ Example
๏ฎ In a school, half the population is white and the other half is Hispanic.
๏ฎ We expected 50% of the connections to be between members of
different races.
๏ฎ If all connections are between members of different races, then we
have a significant finding
Modularity (enumerative)
๏ฎ Extend to which a node is connected to a like in network
๏ฎ + if there are more edges between nodes of the same type than
expected value
๏ฎ - otherwise
is 1 if ci and cj are of same type, and 0 otherwise
err is fraction of edges that join same type of vertices
ar is fraction of ends of edges attached to vertices type r
66
Assortative coefficient (enumerative)
๏ฎ Modularity is almost always less than 1, hence we can
normalize it with the Qmax value
67
Assortative coefficient (scalar)
๏ฎ r=1, perfectly assortative
๏ฎ r=-1, perfectly disassortative
๏ฎ r=0, non-assortative
๏ฎ Usually node degree is used as scale
68
Modularity Example
The number of edges between nodes of the same color
is less than the expected number of edges between them
Assortativity Coefficient of Various Networks
72
M.E.J. Newman. Assortative mixing in networks
Measuring Assortativity for Ordinal Attributes
๏ฎ A common measure for analyzing the relationship between
ordinal values is covariance
๏ฎ It describes how two variables change together
๏ฎ In our case, we have a network
๏ฎ We are interested in how values assigned to nodes that are
connected (via edges) are correlated
Covariance Variables
๏ฎ The value assigned to node is
๏ฎ We construct two variables and
๏ฎ For any edge , we assume that is observed from variable
and is observed from variable
๏ฎ represents the ordinal values associated with the left-node
(the first node) of the edges and represents the values
associated with the right-node (the second node) of the
edges
๏ฎ We need to compute the covariance between variables and
Covariance Variables: Example
: (18, 21, 21, 20)
: (21, 18, 20, 21)
List of edges:
(A, C)
(C, A)
(C, B)
(B, C)
Normalizing Covariance
Pearson correlation is the
normalized version of covariance
In our case:
Correlation Example
Measures and Metrics
๏ฎ Knowing the structure of a network, we can calculate
various useful quantities or measures that capture
particular features of the network topology.
๏ฎ basis of most of such measures are from social network analysis
๏ฎ So far,
๏ฎ Average path length, Diameter, Degree distribution, Density,
Assortativity, Connectedness, Clustering coefficient,
๏ฎ Centrality
๏ฎ Degree, Eigenvector, Katz, PageRank, Hubs, Closeness,
Betweenness, โ€ฆ.
๏ฎ Several other graph metrics
80
Outline
๏ฎ Network metrics can help us characterize networks
๏ฎ This has is roots in graph theory
๏ฎ Today there are many network analysis tools to choose
from

More Related Content

PPT
mathematics of network science: basic definitions
PDF
graph_theory_1-11.pdf___________________
PDF
Lecture 5 - Qunatifying a Network.pdf
PDF
An Introduction to Networks
PPTX
GRAPH THEORY OF NUMBER THEOREM IN DISCRETE MATH
PPTX
Slides BARABASI BARA BASA Barabasi.ppt.pptx
PPT
Socialnetworkanalysis (Tin180 Com)
PDF
Interpretation of the biological knowledge using networks approach
mathematics of network science: basic definitions
graph_theory_1-11.pdf___________________
Lecture 5 - Qunatifying a Network.pdf
An Introduction to Networks
GRAPH THEORY OF NUMBER THEOREM IN DISCRETE MATH
Slides BARABASI BARA BASA Barabasi.ppt.pptx
Socialnetworkanalysis (Tin180 Com)
Interpretation of the biological knowledge using networks approach

Similar to Network Measures: Characterizing networks (20)

PPTX
Introduction to Graph Theory
PPTX
Network properties
PDF
Minicourse on Network Science
PPTX
Networks
PDF
ICPSR - Complex Systems Models in the Social Sciences - Lecture 3 - Professor...
PPT
Graph theory concepts complex networks presents-rouhollah nabati
ย 
PPTX
Slides Chapter10.1 10.2
PPT
graphs.ppt
PPTX
Social Network Analysis - Lecture 4 in Introduction to Computational Social S...
PPTX
Graph ASS DBATU.pptx
PPTX
Network sampling, community detection
PDF
Mathematical Foundations of Network Analysis (by Steve Borgatti).pdf
PPTX
NON-LINEAR DATA STRUCTURE-Graphs.pptx
PPTX
Chapter 1
PPT
graph ASS (1).ppt
PPTX
Data Structures - Introduction to Graph.pptx
PPT
Social network analysis
PDF
Exploratory social network analysis with pajek
PPT
Tn 110 lecture 8
ย 
PPT
GraphGraph data structureGraph data structure.ppt
ย 
Introduction to Graph Theory
Network properties
Minicourse on Network Science
Networks
ICPSR - Complex Systems Models in the Social Sciences - Lecture 3 - Professor...
Graph theory concepts complex networks presents-rouhollah nabati
ย 
Slides Chapter10.1 10.2
graphs.ppt
Social Network Analysis - Lecture 4 in Introduction to Computational Social S...
Graph ASS DBATU.pptx
Network sampling, community detection
Mathematical Foundations of Network Analysis (by Steve Borgatti).pdf
NON-LINEAR DATA STRUCTURE-Graphs.pptx
Chapter 1
graph ASS (1).ppt
Data Structures - Introduction to Graph.pptx
Social network analysis
Exploratory social network analysis with pajek
Tn 110 lecture 8
ย 
GraphGraph data structureGraph data structure.ppt
ย 
Ad

Recently uploaded (20)

PDF
Customer Churn Prediction in Digital Banking: A Comparative Study of Xai Tech...
PDF
FINAL-Content-Marketing-Made-Easy-Workbook-Guied-Editable.pdf
PPTX
Preposition and Asking and Responding Suggestion.pptx
PDF
11111111111111111111111111111111111111111111111
PPTX
Developing lesson plan gejegkavbw gagsgf
PPT
memimpindegra1uejehejehdksnsjsbdkdndgggwksj
PDF
The Fastest Way to Look Popular Buy Reactions Today
PDF
Subscribe This Channel Subscribe Back You
PDF
25K Btc Enabled Cash App Accounts โ€“ Safe, Fast, Verified.pdf
PDF
Mastering Social Media Marketing in 2025.pdf
PPTX
Office Administration Courses in Trivandrum That Employers Value.pptx
PDF
Presence That Pays Off Activate My Social Growth
PDF
Transform Your Social Media, Grow Your Brand
PDF
Why Digital Marketing Matters in Todayโ€™s World Ask ChatGPT
PDF
How can India improve its Public Diplomacy - Social Media.pdf
PDF
StarNetCafeSB2012D3POYNagaworld2-Hotel-Casino-Phnom Entertainment
DOCX
Buy Goethe A1 ,B2 ,C1 certificate online without writing
PDF
Climate Risk and Credit Allocation: How Banks Are Integrating Environmental R...
PDF
The Edge Youโ€™ve Been Missing Get the Sociocosmos Edge
PDF
TikTok Live shadow viewers_ Who watches without being counted
ย 
Customer Churn Prediction in Digital Banking: A Comparative Study of Xai Tech...
FINAL-Content-Marketing-Made-Easy-Workbook-Guied-Editable.pdf
Preposition and Asking and Responding Suggestion.pptx
11111111111111111111111111111111111111111111111
Developing lesson plan gejegkavbw gagsgf
memimpindegra1uejehejehdksnsjsbdkdndgggwksj
The Fastest Way to Look Popular Buy Reactions Today
Subscribe This Channel Subscribe Back You
25K Btc Enabled Cash App Accounts โ€“ Safe, Fast, Verified.pdf
Mastering Social Media Marketing in 2025.pdf
Office Administration Courses in Trivandrum That Employers Value.pptx
Presence That Pays Off Activate My Social Growth
Transform Your Social Media, Grow Your Brand
Why Digital Marketing Matters in Todayโ€™s World Ask ChatGPT
How can India improve its Public Diplomacy - Social Media.pdf
StarNetCafeSB2012D3POYNagaworld2-Hotel-Casino-Phnom Entertainment
Buy Goethe A1 ,B2 ,C1 certificate online without writing
Climate Risk and Credit Allocation: How Banks Are Integrating Environmental R...
The Edge Youโ€™ve Been Missing Get the Sociocosmos Edge
TikTok Live shadow viewers_ Who watches without being counted
ย 
Ad

Network Measures: Characterizing networks

  • 1. Lecture 4: Network Measures CS 765: Complex Networks Slides are modified from Networks: Theory and Application by Lada Adamic
  • 3. Network metrics: components ๏ฎ If there is a path from every vertex in a network to every other, the network is connected ๏ฎ otherwise, it is disconnected ๏ฎ Component: A subset of vertices such that there exist at least one path from each member of the subset to others and there does not exist another vertex in the network which is connected to any vertex in the subset ๏ฎ Maximal subset ๏ฎ A singeleton vertex that is not connected to any other forms a size one component ๏ฎ Every vertex belongs to exactly one component 3
  • 5. network metrics: size of giant component ๏ฎ if the largest component encompasses a significant fraction of the graph, it is called the giant component 5
  • 6. components in directed networks A B C D E F G H Weakly connected components A B C D E G H F 6 ๏ฎ Strongly connected components ๏ฎ Each node within the component can be reached from every other node in the component by following directed links Strongly connected components B C D E A G H F ๏ฎ Weakly connected components: ๏ฎ every node can be reached from every other node by following links in either direction A B C D E F G H
  • 7. components in directed networks ๏ฎ Every strongly connected component of more than one vertex has at least one cycle ๏ฎ Out-component: set of all vertices that are reachable via directed paths starting at a specific vertex v ๏ฎ Out-components of all members of a strongly connected component are identical ๏ฎ In-component: set of all vertices from which there is a direct path to a vertex v ๏ฎ In-components of all members of a strongly connected component are identical 7 A B C D E F G H
  • 8. bowtie model of the web ๏ฎ The Web is a directed graph: ๏ฎ webpages link to other webpages ๏ฎ The connected components tell us what set of pages can be reached from any other just by surfing ๏ฎ no โ€˜jumpingโ€™ around by typing in a URL or using a search engine ๏ฎ Broder et al. 1999 โ€“ crawl of over 200 million pages and 1.5 billion links. ๏ฎ SCC โ€“ 27.5% ๏ฎ IN and OUT โ€“ 21.5% ๏ฎ Tendrils and tubes โ€“ 21.5% ๏ฎ Disconnected โ€“ 8% 8
  • 9. Characterizing networks: How far apart are things? 9
  • 10. Network metrics: paths ๏ฎ A path is any sequence of vertices such that every consecutive pair of vertices in the sequence is connected by an edge in the network. ๏ฎ For directed: traversed in the correct direction for the edges. ๏ฎ path can visit itself (vertex or edge) more than once ๏ฎ Self-avoiding paths do not intersect themselves. ๏ฎ Path length r is the number of edges on the path ๏ฎ Called hops 10
  • 11. Paths ๏ฎ A path between nodes i0 and in is an ordered list of n links P = {(i0, i1), (i1, i2), (i2, i3), ... ,(in-1, in)}. ๏ฎ The length of the path is n. ๏ฎ The path shown in orange in (a) follows the route 1โ†’2โ†’5โ†’7โ†’4โ†’6, hence its length is n = 5 ๏ฎ The shortest paths between nodes 1 and 7, or the distance d17, correspond to the path with the fewest number of links that connect nodes 1 to 7. ๏ฎ There can be multiple paths of the same length, as illustrated by the two paths shown in orange and grey. ๏ฎ The network diameter is the largest distance in the network ๏ฎ being dmax = 3 here.
  • 12. Independent paths ๏ฎ Edge independent paths: if they share no common edge ๏ฎ Vertex independent paths: if they share no common vertex except start and end vertices ๏ฎ Vertex-independent => Edge-independent ๏ฎ Also called disjoint paths ๏ฎ These set of paths are not necessarily unique ๏ฎ Connectivity of vertices: the maximal number of independent paths between a pair of vertices ๏ฎ Used to identify bottlenecks and resiliency to failures 12
  • 13. Cut Sets and Maximum Flow ๏ฎ A minimum cut set is the smallest cut set that will disconnect a specified pair of vertices ๏ฎ Need not to be unique ๏ฎ Mengerโ€™s theorem: If there is no cut set of size less than n between a pair of vertices, then there are at least n independent paths between the same vertices ๏ฎ Implies that the size of min cut set is equal to maximum number of independent paths ๏ฎ for both edge and vertex independence ๏ฎ Maximum Flow between a pair of vertices is the number of edge independent paths times the edge capacity 13
  • 15. Network metrics: shortest paths ๏ฎ A B C D E 1 2 2 3 3 15 3
  • 16. Structural metrics: Average path length 16 1 โ‰ค L โ‰ค D โ‰ค N-1
  • 17. shortest paths ๏ฎ <d> = 0.35 + 2.06 log(N) ๏ฎ prediction: <d> = 17.5 for 200 million nodes ๏ฎ actual: <d> = 16 for reachable pairs 0 2 4 6 8 10 x 10 4 0 5 10 15 20 25 average shortest path number of webpages
  • 18. Paths 18 path Shortest path Diameter Average path length Cycle Eulerian path Hamiltonian path
  • 19. Node degree ๏ฎ Outdegree = 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 0 0 0 1 1 1 0 0 0 A = ๏ƒฅ ๏€ฝ n j ij A 1 example: outdegree for node 3 is 2, which we obtain by summing the number of non- zero entries in the 3rd row ๏ฎ Indegree = 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 0 0 0 1 1 1 0 0 0 A = ๏ƒฅ ๏€ฝ n i ij A 1 example: the indegree for node 3 is 1, which we obtain by summing the number of non-zero entries in the 3rd column ๏ƒฅ ๏€ฝ n i i A 1 3 ๏ƒฅ ๏€ฝ n j j A 1 3 1 2 3 4 5 19
  • 21. Degree sequence and Degree frequency ๏ฎ Degree sequence: An ordered list of the (in,out) degree of each node ๏ฎ In-degree sequence: ๏ฎ [2, 2, 2, 1, 1, 1, 1, 0] ๏ฎ Out-degree sequence: ๏ฎ [2, 2, 2, 2, 1, 1, 1, 0] ๏ฎ (undirected) degree sequence: ๏ฎ [3, 3, 3, 2, 2, 1, 1, 1] ๏ฎ Degree frequency: A frequency count of the occurrence of each degree In-degree frequency: [(2,3) (1,4) (0,1)] Out-degree frequency : [(2,4) (1,3) (0,1)] (undirected) frequency : [(3,3) (2,2) (1,3)] 0 1 2 0 1 2 3 4 5 indegree frequency 21
  • 22. Degree distribution ๏ฎ The degree distribution is a function P(k), which gives the probability of a randomly chosen node from the graph having degree k 22 In-degree 0 1 2 3 Frequency 1 4 3 0 Distribution 0.13 0.50 0.38 0.00 Out-degree 0 1 2 3 Frequency 1 3 4 0 Distribution 0.13 0.38 0.50 0.00 Degree 0 1 2 3 Frequency 0 3 2 3 Distribution 0.00 0.38 0.25 0.38
  • 23. Structural Metrics: Degree distribution 23
  • 24. Degree Distribution Plot The -axis represents the degree and the -axis represents the fraction of nodes having that degree ๏ฎOn social networking sites There exist many users with few connections and there exist a handful of users with very large numbers of friends. Facebook Degree Distribution
  • 25. Degree distributions ๏ฎ Imagine I have a graph with 1000 nodes, but no links. Now I start adding links randomly, one by one. ๏ฎ After 10 random additions, what do you expect the degree distribution to be? ๏ฎ What will the average node degree be after 1000 additions? ๏ฎ The standard situation in a network where links are added completely at random. ๏ฎ If there are n nodes, and m edges randomly added, then the peak of this is at 2m/n, the average degree. ๏ฎ For a randomly picked node, the most likely degree is the average one. ๏ฎ The probabilities then drop quickly either side. P(k) 0 0.05 0.1 0.15 0.2 0.25 0.3 1.00 3.00 5.00 7.00 9.00 11.00 13.00 15.00 17.00
  • 27. degree distribution ๏ฎ indegree, a ~ 2.1 ๏ฎ outdegree, a ~ 2.4 source: Pennock et al.: Winners don't take all: Characterizing the competition for links on the web PNAS April 16, 2002 vol. 99 no. 8 5207-5211
  • 29. network metrics: graph density ๏ฎ Of the connections that may exist between n nodes ๏ฎ directed graph Lmax = n*(n-1) ๏ฎ undirected graph Lmax = n*(n-1)/2 ๏ฎ What fraction are present? ๏ฎ density = L / Lmax ๏ฎ In real networks L << Lmax ๏ฎ For example, out of 12 possible connections, this graph has 7, giving it a density of 7/12 = 0.583 29
  • 30. Graph density 30 ๏ฎ Would this measure be useful for comparing networks of different sizes (different numbers of nodes)? ๏ฎ As n โ†’ โˆž, a graph whose density reaches ๏ฎ 0 is a sparse graph ๏ฎ a constant is a dense graph
  • 31. Transitivity ๏ฎ ๏ฏ is said to be transitive if a ๏ฏ b and b ๏ฏ c together imply a ๏ฏ c ๏ฎ Perfect transitivity in network โ†’ cliques ๏ฎ Partial transitivity ๏ฎ u knows v and v knows w โ†’ = 31
  • 32. Local Clustering Coefficient ๏ฎ Clustering coefficient measures transitivity in undirected graphs ๏ฎ Local clustering coefficient measures transitivity at the node level ๏ฎ Commonly employed for undirected graphs ๏ฎ Computes how strongly neighbors of a node (nodes adjacent to ) are themselves connected In an undirected graph, the denominator can be rewritten as:
  • 33. Local Clustering Coefficient: Example ๏ฎ Thin lines depict connections to neighbors ๏ฎ Dashed lines are the missing connections among neighbors ๏ฎ Solid lines indicate connected neighbors ๏ฎ When all neighbors are connected ๏ฎ When none of neighbors are connected
  • 36. Clustering Coefficient and Triples ๏ฎ Triple: an ordered set of three nodes, ๏ฎ connected by two (open triple) edges or ๏ฎ three edges (closed triple) ๏ฎ A triangle can miss any of its three edges ๏ฎ A triangle has 3 Triples and are different triples โ€ข The same members โ€ข First missing edge and second missing and are the same triple
  • 37. [Global] Clustering Coefficient ๏ฎ Count paths of length two and check whether the third edge exists When counting triangles, since every triangle has 6 closed paths of length 2 Or we can rewrite it as
  • 38. [Global] Clustering Coefficient: Example โ€ข Average clustering coefficient and global clustering coefficient are different โ€ข In some extreme cases they could differ considerably
  • 40. clustering & motifs ๏ฎ clustering coefficient ~ 0.11 (at the site level) Source: Milo et al., โ€œSuperfamilies of evolved and designed networksโ€, Science 303 (5663), p. 1538-1542, 2004.
  • 41. 41
  • 42. Local Clustering and Redundancy ๏ฎ Redundancy 42
  • 43. Reciprocity If you become my friend, Iโ€™ll be yours ๏ฎ Reciprocity is simplified version of transitivity ๏ฎ It considers closed loops of length 2 ๏ฎ If node is connected to node , ๏ฎ by connecting to , exhibits reciprocity
  • 44. Reciprocity ๏ฎ How likely is it that the node you point to will point to you as well. 44
  • 46. Cocitation and Bibliographic coupling ๏ฎ Cocitation of two vertices i and j is the number of vertices that have outgoing edges to both ๏ฎ Bibliographic coupling is the number of vertices to which both point 46
  • 47. Signed Edges and Structural balance ๏ฎ Friends / Enemies ๏ฎ Friend of friend โ†’ ๏ฎ Enemy of my enemy โ†’ ๏ฎ Structural balance: only loops of even number of โ€œnegative linksโ€ ๏ฎ Structurally balanced โ†’ partitioned into groups where internal links are positive and between group links are negative 47
  • 48. Social Balance Theory ๏ฎ Consistency in friend/foe relationships among individuals ๏ฎ Informally, friend/foe relationships are consistent when ๏ฎ In the network ๏ฎ Positive edges demonstrate friendships () ๏ฎ Negative edges demonstrate being enemies () ๏ฎ Triangle of nodes , and , is balanced, if and only if ๏ฎ denotes the value of the edge between nodes and
  • 49. Social Balance Theory: Possible Combinations For any cycle if the multiplication of edge values become positive, then the cycle is socially balanced
  • 50. 50 Keith Collins, Loubna Mrie - Quartz
  • 51. Similarity ๏ฎ What interaction patterns are common? ๏ฎ Reciprocity and Transitivity ๏ฎ Balance and Status ๏ฎ Who are the like-minded users and how can we find these similar individuals? ๏ฎ Similarity ๏ฎ Who are the central figures (influential nodes) in the network? ๏ฎ Centrality
  • 52. Structural Equivalence ๏ฎ Structural Equivalence: ๏ฎ We look at the neighborhood shared by two nodes; ๏ฎ The size of this shared neighborhood defines how similar two nodes are. ๏ฎ Example: ๏ฎ Two brothers have in common ๏ฎ sisters, mother, father, grandparents, etc. ๏ฎ This shows that they are similar
  • 53. ๏ฎ Vertex similarity: ๏ฎ The neighborhood often excludes the node itself ๏ฎ Issue? ๏ฎ Connected nodes not sharing a neighbor will be assigned zero similarity ๏ฎ Solution: ๏ฎ We can assume nodes are included in their neighborhoods Structural Equivalence: Definitions Jaccard Similarity: Cosine Similarity: Normalize?
  • 55. Similarity Significance Measuring Similarity Significance: compare the calculated similarity value with its expected value where vertices pick their neighbors at random ๏ฎ For vertices and with degrees and this expectation is ๏ฎ There is a chance of becoming โ€˜s neighbor ๏ฎ selects neighbors ๏ฎ We can rewrite neighborhood overlap as
  • 57. Normalized Similarity, cont. times the Covariance between and Normalize the covariance by the multiplication of Variances We get Pearson correlation coefficient (range of ๏ณ ๏ƒŽ [-1,1] )
  • 58. Similarity ๏ฎ Structural Equivalence: share many of the same neighbors ๏ฎ Jaccard Similarity: ๏ฎ Cosine Similarity: ๏ฎ Pearson Coefficient: Given degree of two nodes, how many common neighbors they have () ๏ฎ Euclidian Distance: ๏ฎ Regular Equivalence: neighbors are the same ๏ฎ Katz Similarity: 58
  • 59. Regular Equivalence ๏ฎ In regular equivalence, ๏ฎ We do not look at neighborhoods shared between individuals, but ๏ฎ How neighborhoods themselves are similar ๏ฎ Example: ๏ฎ Athletes are similar not because they know each other in person, but since they know similar individuals, such as coaches, trainers, other players, etc.
  • 60. โ€ข , are similar when their neighbors and are similar Regular Equivalence
  • 61. Regular Equivalence ๏ฎ and are similar when is similar to โ€™s neighbors ๏ฎ In vector format A vertex is highly similar to itself, we guarantee this by adding an identity matrix to the equation W the matrix is invertible
  • 62. Regular Equivalence: Example ๏ฎ Any row/column of this matrix shows the similarity to other vertices ๏ฎ Vertex 1 is most similar (other than itself) to vertices 2 and 3 ๏ฎ Nodes 2 and 3 have the highest similarity (regular equivalence) The largest eigenvalue of is 2.43 Set
  • 63. Homophily and Assortative Mixing ๏ฎ Assortativity: Tendency to be linked with nodes that are similar in some way ๏ฎ Humans: age, race, nationality, language, income, education level, etc. ๏ฎ Citations: similar fields than others ๏ฎ Web-pages: Language ๏ฎ Disassortativity: Tendency to be linked with nodes that are different in some way ๏ฎ Network providers: End users vs other providers ๏ฎ Assortative mixing can be based on ๏ฎ Enumerative characteristic ๏ฎ Scalar characteristic 63
  • 64. Assortativity: An Example ๏ฎ The friendship network in a US high school in 1994 ๏ฎ Colors represent races, ๏ฎ White: whites ๏ฎ Grey: blacks ๏ฎ Light Grey: hispanics ๏ฎ Black: others ๏ฎ High assortativity between individuals of the same race
  • 65. Assortativity Significance ๏ฎ Assortativity significance ๏ฎ The difference between measured assortativity and expected assortativity ๏ฎ The higher this difference, the more significant the assortativity observed ๏ฎ Example ๏ฎ In a school, half the population is white and the other half is Hispanic. ๏ฎ We expected 50% of the connections to be between members of different races. ๏ฎ If all connections are between members of different races, then we have a significant finding
  • 66. Modularity (enumerative) ๏ฎ Extend to which a node is connected to a like in network ๏ฎ + if there are more edges between nodes of the same type than expected value ๏ฎ - otherwise is 1 if ci and cj are of same type, and 0 otherwise err is fraction of edges that join same type of vertices ar is fraction of ends of edges attached to vertices type r 66
  • 67. Assortative coefficient (enumerative) ๏ฎ Modularity is almost always less than 1, hence we can normalize it with the Qmax value 67
  • 68. Assortative coefficient (scalar) ๏ฎ r=1, perfectly assortative ๏ฎ r=-1, perfectly disassortative ๏ฎ r=0, non-assortative ๏ฎ Usually node degree is used as scale 68
  • 69. Modularity Example The number of edges between nodes of the same color is less than the expected number of edges between them
  • 70. Assortativity Coefficient of Various Networks 72 M.E.J. Newman. Assortative mixing in networks
  • 71. Measuring Assortativity for Ordinal Attributes ๏ฎ A common measure for analyzing the relationship between ordinal values is covariance ๏ฎ It describes how two variables change together ๏ฎ In our case, we have a network ๏ฎ We are interested in how values assigned to nodes that are connected (via edges) are correlated
  • 72. Covariance Variables ๏ฎ The value assigned to node is ๏ฎ We construct two variables and ๏ฎ For any edge , we assume that is observed from variable and is observed from variable ๏ฎ represents the ordinal values associated with the left-node (the first node) of the edges and represents the values associated with the right-node (the second node) of the edges ๏ฎ We need to compute the covariance between variables and
  • 73. Covariance Variables: Example : (18, 21, 21, 20) : (21, 18, 20, 21) List of edges: (A, C) (C, A) (C, B) (B, C)
  • 74. Normalizing Covariance Pearson correlation is the normalized version of covariance In our case:
  • 76. Measures and Metrics ๏ฎ Knowing the structure of a network, we can calculate various useful quantities or measures that capture particular features of the network topology. ๏ฎ basis of most of such measures are from social network analysis ๏ฎ So far, ๏ฎ Average path length, Diameter, Degree distribution, Density, Assortativity, Connectedness, Clustering coefficient, ๏ฎ Centrality ๏ฎ Degree, Eigenvector, Katz, PageRank, Hubs, Closeness, Betweenness, โ€ฆ. ๏ฎ Several other graph metrics 80
  • 77. Outline ๏ฎ Network metrics can help us characterize networks ๏ฎ This has is roots in graph theory ๏ฎ Today there are many network analysis tools to choose from

Editor's Notes

  • #44: Trace of a matrix is the sum of diagonal elements
  • #78: \sigma = E(X-E(X))^2