Download presentation
Presentation is loading. Please wait.
1
Network analysis
2
A network/graph consists of nodes/vertices connected by links/edges
Network: definition A network/graph consists of nodes/vertices connected by links/edges node/ vertex edge Notation:
3
Multigraph vs. simple graph
loop multiple edge Multigraph can contain loops and multiple edges Simple graph
4
Directed vs. undirected graph
In a directed graph, an edge has a beginning and an end, i.e. In a simple graph, an edge is an unordered pair of vertices, i.e. Asymmetric relationship Symmetric relationship
5
Weighted vs. unweighted graph
Each edge has an associated ‘strength’: Carries only information about presence / absence of an edge: 0.5 1 1 -0.7 0.2 0.3 0.9
6
Use a network type according to what is relevant in your dataset
Databases are noisy, so check whether you need to get rid of loops, multiple/directed edges, etc., when constructing a network We present tools to analyze simple undirected unweighted graphs, but many of them can be extended to deal with other types of networks as well.
7
Storing a graph: adjacency matrix
Two vertices are adjacent/neighbours if they are connected by an edge Adjacency matrix of a graph G is defined as where if vertices i, j are adjacent otherwise Example: Graph Other possibilities: incidence matrix, edge list
8
Network analysis Comparing different networks to each other OR
e.g. by network properties that assign a single number to each network OR 2. Comparing different nodes within the same network e.g. by node centrality measures that assign a number to every node in the network
9
1.a Connectivity: ‘Can I get there?’
b A walk from vertex a to b is a ‘sequence of edges connecting a to b’ A path is a walk that does not intersect itself A distance between a and b is the length of a shortest path between a and b A component is a part of a graph in which any two vertices are connected by a path Is the graph dis/connected? Number of components c d e Walk: dcbae Path: dcab d(a,b) =1 # of components: 2
10
1.a Connectivity: ‘Can I get there?’
Edge/vertex connectivity = the minimum number of edges/vertices that need to be removed to disconnect a graph a b Edge connectivity: 2 Vertex connectivity: 1 c d e
11
1.b Shortest paths: ‘How far is it?’
Diameter = the length of a longest shortest path between a pair of vertices in a graph ‘at most how far are two vertices from each other?’ Average shortest path length = average of the lengths of shortest paths between all pairs of vertices a b Diameter: 2 c Average shortest path length: 15/10 = 1.5 d e
12
1.c Edge-layout properties
Edge density = ‘Proportion of edges out of all possible edges’ where n = number of vertices in the graph and a b c d
13
1.c Edge-layout properties
Degree of vertex v = number of vertices adjacent to v in the graph Average degree where n = number of vertices in the graph a b c Average Degree d
14
1.c Edge-layout properties
where # triangles(v) = number of triangles in the graph having v as its vertex Clustering coefficient = ‘if vertex i has neighbours j and k, what is the probability that also j and k are neighbours?’ a b c d
15
2.a Degree centrality For every vertex v in a graph,
Degree centrality (v) = deg(v) ‘The most important in the graph are the vertices with highest degrees’ a b a 2 b 2 c 3 d 1 c d
16
2.b Betweenness centrality
For every vertex v in the graph, Betweenness centrality (v) = ‘Proportion of shortest paths between vertices i and j that pass through vertex v, out of all shortest paths between i and j; summing over all pairs of vertices in the graph ’ a b a 1/2 b 0 c 0 d 1/2 c d
17
2.c ‘Closeness’ centralities
‘The closer a vertex is to other vertices, the more important it is’ For every vertex v in the graph, compute Geometric centrality (v) = where d(i,v) is the distance between i and v Closeness centrality (v) = The above only work for connected graphs Harmonic centrality (v) =
18
2.c ‘Closeness’ centralities
Vertex a has distance 1, 1 and 2 from b, c and d, respectively. Therefore, a b c d Geometric Closenness Harmonic a 4/3 3/4 5/6 b c 1 d 5/3 3/5 2/3
19
2.d Eigenvector centrality
‘The more important neighbours a vertex has, the more important it is’ Eigenvalue centrality (i) = where A is the adjacency matrix Rewriting in a vector form, get i.e. The ith entry of the eigenvector corresponding to the (unique) largest eigenvalue give the centrality of vertex i. By Perron-Frobenius theorem, all centralities are positive. Provides a relative measure. For an absolute measure, need to normalize the eigenvector, e.g. so that its entries sum up to 1.
20
2. Exercise Find a small network in which the maximum for 3 different centrality measures is attained by 3 different vertices.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.