emergent network models
play

Emergent Network Models Prof. Lars-Erik Cederman Center for - PowerPoint PPT Presentation

Introduction to Computational Modeling of Social Systems Emergent Network Models Prof. Lars-Erik Cederman Center for Comparative and International Studies (CIS) Seilergraben 49, Room G.2, lcederman@ethz.ch Nils Weidmann, CIS Room E.3,


  1. Introduction to Computational Modeling of Social Systems Emergent Network Models Prof. Lars-Erik Cederman Center for Comparative and International Studies (CIS) Seilergraben 49, Room G.2, lcederman@ethz.ch Nils Weidmann, CIS Room E.3, weidmann@icr.gess.ethz.ch http://www.icr.ethz.ch/teaching/compmodels Lecture, January 18, 2005

  2. Today’s agenda 2 • Overview: Emergent social forms • Emergent-network models • Graph theory • Small Worlds • Scale-Free Networks • Repast’s network support • NetIPD and Homework D

  3. Emergent social forms 3 1. Interaction patterns 2. Property configurations 3. Dynamic networks 4. Actor structures

  4. 1. Emergent interaction patterns 4 • Models of “emergent order” producing configurations • Axelrod (1984, chap. 8): actor actor actor “The structure of actor actor actor cooperation” actor actor actor

  5. 2. Emergent property configurations 5 • Models of “emergent structure” constituted as property configruations • Example: Schelling’s segregation model; Carley 1991; Axelrod 1997 • See Macy 2002 for further actor actor actor references actor actor actor actor actor actor actor actor actor actor actor actor actor actor actor

  6. 3. Emergent dynamic networks 6 • Most computational frequency models treat networks as exogenous d - α • Recent exceptions: – Albert and Barabási’s scale- degree d free networks – Economics and evolutionary game theory: e.g. Skyrms and Pemantle

  7. 4. Emergent actor structures 7 • Computational models normally assume the actors to be given • Exceptions: – Axelrod’s model of new political actors – Axtell’s firm-size model – Geopolitical models in the Bremer & Mihalka tradition • Emergence?

  8. Elementary graph theory 8 • Links (edges) and nodes (vertices), G=(E, V) – Uni/Bidirectional graphs – (In/Out) Degree of a node, degree distribution – Weighted edges 5 43 B C 6 A 23 1 I 2 F 4 K 2 D 9 E 3 8 J 10 G H 53

  9. Phase shift in random graphs 9 Erdös and Rényi 1959 Fraction of nodes in largest component 1 Average number 0 1 of links per node

  10. The small-world experiment 10 “Six degrees of separation” Sharon, MA Stanley Milgram Omaha, NE

  11. Between order and randomness 11 Watts and Strogatz’s Beta Model

  12. Two degree distributions 12 log p(k) log p(k) p(k) p(k) log k log k k k Normal distribution Power law

  13. Scale-free networks 13 • Barabási and Albert’s 1999 model of the Internet: • Constantly growing network • Preferential attachments: – p ( k ) = k / Σ i k i

  14. Creating nodes and edges 14 • Nodes Node A Edge Node nodeA = new DefaultNode(“A”); Node nodeB = new DefaultNode(“B”); • Edge (hand coding) Edge edge = new DefaultEdge(nodeA, nodeB); nodeA.addOutEdge(edgeAB); B nodeB.addInEdge(edgeAB); Direction • Edge (simplified way) Edge edge = EdgeFactory.createEdge(nodeA, nodeB); • Edges can also labeled and given a strength • Node and Edge are interfaces and specialized (agent) classes can easily be implemented

  15. Node accessors 15 • addInEdge(Edge) and addOutEdge(Edge) Add an in or out edge to the node • removeInEdge(Edge), removeOutEdge(Edge) Removes the specified edge from the list of in or out edges • getInEdges() and getOutEdges() Gets an ArrayList of edges going in or out from the node • hasEdgeFrom(Node) and hasEdgeTo(Node) Returns true if the node has an edge from or to the specified node, false otherwise • getNodeLabel() and setNodeLabel(String)

  16. Edge accessors 16 • getFrom() and getTo() Gets the node that this edge comes from or goes to • setFrom(Node) and setTo(Node) Typically distance or Sets the from or to node similarity • getStrength() and setStrength(double) Gets/sets the strength of this edge To encode • getType() and setType(String) the type of Gets the type of this edge relationship , e.g. a • getLabel() and setLabel(String) marriage Gets/sets the label for this edge

  17. NetUtilities 17 Contains some useful static methods for computing statistics or rearranging a network, e.g. • calcDensity(List) Calculates density (ratio of arcs in network to maximum possible number of arcs) of passed network • hasSelfLoops(List) Returns a boolean indicating whether the network contains self-loops (links from i -> i) • randomRewire(ArrayList, double prob) Returns a network of the same size and density as the passed network, but randomly "rewires" a fraction of the edges to randomly chosen target nodes.

  18. Displaying networks 18 • Network2DDisplay : similar to any other display: Contains the list of nodes public void buildModel() { GraphLayout layout = new DefaultGraphLayout(agentList, 500, 500); Network2DDisplay display = new Network2DDisplay(layout); dsurf.addDisplayableProbeable(display, "Display"); addSimEventListener(dsurf); dsurf.display(); } public void step() { dsurf.updateDisplay(); }

  19. Displaying nodes and edges 19 • Every node and edge must implement the Drawable2DNode and DrawableEdge interfaces • Default implementations: – DefaultDrawableNode – DefaultDrawableEdge • Can be parameterized with customized drawing code: NetworkDrawable (e.g. RectNetworkItem , OvalNetworkItem )

  20. Graph layout 20 • By default ( DefaultGraphLayout ), nodes are positioned according to the x/y coordinates • CircularGraphLayout position them on a circle • Need to call layout.updateLayout() in step method.

  21. Graph layout (cont.) 21 • FruchGraphLayout attempts to minimize the overall length of the edges according to their strength (spring-based simulation) • Can be slow graphLayout = new FruchGraphLayout(...); Controller c = (Controller)getController(); c.addStopListener(graphLayout); c.addPauseListener(graphLayout); c.addExitListener(graphLayout)

  22. Charting 22 • As usual, but using NetSequenceGraph • Contains predefined statistics:

  23. Data importing and exporting 23 • Import: NetworkFactory List list = NetworkFactory.getNetwork( “network.dl”, NetworkFactory.DL, MyNode.class, MyEdge.class, NetworkFactory.BINARY); • Export: NetworkRecorder NetworkRecroder recorder = new NetworkRecorder( NetworkRecroder.BINARY, “network.dl”, this ); recorder.record(nodeList, "tick: " + getTickCount(),NetworkRecorder.BINARY); recorder.write();

  24. Homework D 24 Download and install the NetIPD model from the course website (www.icr.ethz.ch/teaching/compmodels/models/netipd). The model extends the IPD introduced in the RePast tutorial to a network topology. It has three topologies implemented, with the first two (FRN and FRNE) described in (Cohen et al., 1999). The third topology (PN) is a parametrized network and uses the „Beta“-parameter. D1) Perform simulation runs with the PN topology for different values of beta (at least 10), ranging from 0 to 1. For each value, perform 50 runs of the model with different random seeds. Plot the percentage of runs where there is a TFT majority at the end of the 200th step against the value of beta. D2) Look at the implementation of the parametrized network. What topology described in the (Cohen et al., 1999) paper does it resemble (a) for beta=0 and (b) for beta=1? D3) What is your explanation for the results‘ variation with beta?

  25. Submission format 25 Exercise D1 One file plot.<ext> (graphics or PDF) with your plot Exercise D2 One file called d2.<ext> (text or PDF) with your answer Exercise D3 One file called d3.<ext> (text or PDF) with your answer Solutions should be sent by e-mail to weidmann@icr.gess.ethz.ch, with only the required files attached. Please do not put your answers directly in the text of your e-mail message.

Recommend


More recommend