Download presentation
Presentation is loading. Please wait.
Published byFrancine Harrell Modified over 6 years ago
1
851-0585-04L – Modeling and Simulating Social Systems with MATLAB
L – Modeling and Simulating Social Systems with MATLAB Lecture 7 – Simulations with Networks Karsten Donnay and Stefano Balietti Chair of Sociology, in particular of Modeling and Simulation © ETH Zürich | © ETH Zürich |
2
Schedule of the course Introduction to MATLAB
Schedule of the course Introduction to MATLAB 20.02. 27.02. 05.03. 12.03. 19.03. 26.03. 02.04. 23.04. 30.04. 07.05. 14.05. 21.05. 28.05. Introduction to social-science modeling and simulations Working on projects (seminar thesis) Handing in seminar thesis and giving a presentation
3
Schedule of the course Different ways of Introduction to MATLAB
Schedule of the course Different ways of Representing space Introduction to MATLAB 20.02. 27.02. 05.03. 12.03. 19.03. 26.03. 02.04. 23.04. 30.04. 07.05. 14.05. 21.05. 28.05. Dynamical Systems (no-space) Cellular Automata (grid) Networks (graphs) Working on projects (seminar thesis) Continuous Space (…) Handing in seminar thesis and giving a presentation
4
Goals of Lecture 7: students will
Consolidate knowledge acquired during lecture 6, through brief repetition of the main points Translate a research question into a simple model of simulation on networks Get a firm grasp in algorithms to generate different network topologies Review a custom implementation of algorithms to efficiently: Generate different networks topologies Compute statistical properties Run a simple simulation of the emergence of giant component in a random network
5
Repetition: Definition of Graph
Repetition: Definition of Graph A graph consists of two entities: Nodes (vertices): N Links: L Edge: undirected link Arc: directed link The graph is defined as G = (N,L) Source: Batagelj
6
Repetition: Networks Topologies
Random: Small average path length Small clustering coefficient (in general) Small World: High clustering coefficient Scale Free (Power Law): Slightly smaller average path length Highest clustering coefficient
7
Repetition: Networks Topologies
Random: Small average path length Small clustering coefficient (in general) Small World: High clustering coefficient Scale Free: Slightly smaller average path length Highest clustering coefficient Homegeneous (Exponential) Degree Distr. Power Law Degree Distr.
8
Examples of different network topologies
Examples of different network topologies Differences between an exponential network—a U.S. roadmap and a scale-free network—an air- line routing map. On the roadmap, the nodes are cities that are connected by highways. This is a fairly uniform network: each major city has at least one link to the highway system, and there are no cities served by hundreds of highways. The airline routing map dif- fers drastically from the roadmap. The nodes of this network are airports connected by direct flights among them. There are a few hubs on the airline routing map, including Chicago, Dallas, Denver, Atlanta, and New York, from which flights depart to almost all other U.S. airports. The vast majority of airports are tiny, appearing as nodes with one or a few links connecting them to one or sev- eral hubs. Source: Wang (2003)
9
From a problem to a scientific answer
Observation: The role of social networks in shaping the public opinion is becoming increasingly more important
10
From a problem to a scientific answer
Question: How easy is to be manipulated in a social network? Vs.
11
From a problem to a scientific answer
Literature Review: Was the problem already treated?
12
From a problem to a scientific answer
Literature Review: How existing models can be improved? ?
13
From a problem to a scientific answer
Creating a new model Let us assume ‘informed’ agents Let us consider networks
14
How to generate random, realistic graphs?
Generators How to generate random, realistic graphs? Probabilistic generators Degree-based generators Process-based generators Recursive/self-similar generators
15
Probabilistic Generators: Erdos-Renyi
Algorithm: Start with a number of nodes n (fully not connected) Define probability of connection P For all the possible couples of nodes a link is created with probability P The average number of links is given by: p*n*(n-1)/2 The greater P the higher the average degree of the network
16
Probabilistic Generators: Erdos-Renyi
random graph – 100 nodes, avg degree = 2 Fascinating properties (phase transition) But: unrealistic (Poisson degree distribution != power law)
17
E-R model & Percolation
Pc The formation of the Giant Component is not a smooth process. It emerge all of sudden when p > 1/n This phenomenon is called 1st order phase-transition 1 N->infty K K0 K = avg(k) Pc = Prob( there is a giant connected component)
18
Graphs: Laws and patterns
(C) 2010, C. Faloutsos Graphs: Laws and patterns Are real graphs random? If we look at the data the answer most of the time is: NO!! count count k degree degree k
19
Degree-based generators
Figure out the degree distribution (eg., ‘Zipf’) Assign degrees to nodes Put edges, so that they match the original degree distribution
20
Process-based: Preferential attachment
Algorithm: Start with a random connected graph At each time step create a new node and attach it to the others with probability: Ki = degree of node i That is: if a node has many links, it will get more in the future…
21
Process-based: Preferential attachment
Generates power-law tails (richer-get-richer) The degree distribution is a power law of the form: P(K) ~ k-3
22
Process-based: Preferential attachment
Generates power-law tails (richer-get-richer) The degree distribution is a power law of the form: P(K) ~ k-3 But still, it does not reproduce the property of shrinking diameter in real evolving networks…
23
Get the lecture files from GitHub
Get the lecture files from GitHub Lecture files are also available on a GitHub repository:
24
Get the lecture files from GitHub
Get the lecture files from GitHub If you have already uploaded your public key in GitHub (see live presentation), You can dowload the latest lecture files with the following command in GIT Bash to stay updated: git clone git pull
25
Lecture Files Generate Compute: Export to file: Random Networks
Lecture Files Generate Random Networks Small World Networks Scale Free Networks Compute: Average Path Length Clustering Coefficient Export to file: Parse an adjacency matrix and create an arc list Write a cell array as a csv file
26
Lecture Files Simulate the emergence of the giant component in a random network (files online in .zip archive). emergence.m emergence_video.m emergence_smooth.m See live demo.
27
R and Matlab integration to plot nice graphs
SOCNET Mailing List R and Matlab integration to plot nice graphs
28
Social Network Analysis Mailing List:
SOCNET Mailing List Social Network Analysis Mailing List:
29
References Jure Leskovec, Deepayan Chakrabarti, Jon M. Kleinberg, Christos Faloutsos: Realistic, Mathematically Tractable Graph Generation and Evolution, Using Kronecker Multiplication. PKDD 2005: Xiao Fan Wang and Guanrong Chen Complex Networks: Small- World, Scale-Free and Beyond Damon Centola, The Spread of Behavior in an Online Social Network Experiment. Science, Vol. 329 no pp (2010) Duncan J. Watts, Steven H. Strogatz, Collective dynamics of 'small- world' networks. Nature 393, (4 June 1998) Laszlo Barabasi, Scale-Free Networks: A Decade and Beyond. cience 24 July 2009: Vol. 325 no. 5939 Laszlo Barabasi web site: takedowns-and-meltdowns-but-very-little-truth/?xid=newsletter- europe-weekly
30
Projects Today, there are no exercises. Instead, you can work on your projects and we will supervise you.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.