Release 1.8.1 Aric Hagberg, Dan Schult, Pieter

Total Page:16

File Type:pdf, Size:1020Kb

Release 1.8.1 Aric Hagberg, Dan Schult, Pieter NetworkX Reference Release 1.8.1 Aric Hagberg, Dan Schult, Pieter Swart August 04, 2013 CONTENTS 1 Overview 1 1.1 Who uses NetworkX?..........................................1 1.2 Goals...................................................1 1.3 The Python programming language...................................1 1.4 Free software...............................................2 1.5 History..................................................2 2 Introduction 3 2.1 NetworkX Basics.............................................3 2.2 Nodes and Edges.............................................4 3 Graph types 9 3.1 Which graph class should I use?.....................................9 3.2 Basic graph types.............................................9 4 Algorithms 127 4.1 Approximation.............................................. 127 4.2 Assortativity............................................... 132 4.3 Bipartite................................................. 141 4.4 Blockmodeling.............................................. 160 4.5 Boundary................................................. 161 4.6 Centrality................................................. 163 4.7 Chordal.................................................. 181 4.8 Clique.................................................. 185 4.9 Clustering................................................ 187 4.10 Communities............................................... 191 4.11 Components............................................... 191 4.12 Connectivity............................................... 205 4.13 Cores................................................... 214 4.14 Cycles.................................................. 218 4.15 Directed Acyclic Graphs......................................... 219 4.16 Distance Measures............................................ 222 4.17 Distance-Regular Graphs......................................... 224 4.18 Eulerian.................................................. 226 4.19 Flows................................................... 227 4.20 Graphical degree sequence........................................ 239 4.21 Hierarchy................................................. 243 4.22 Isolates.................................................. 244 4.23 Isomorphism............................................... 245 4.24 Link Analysis............................................... 258 4.25 Matching................................................. 264 i 4.26 Maximal independent set......................................... 265 4.27 Minimum Spanning Tree......................................... 266 4.28 Operators................................................. 268 4.29 Rich Club................................................. 275 4.30 Shortest Paths.............................................. 276 4.31 Simple Paths............................................... 294 4.32 Swap................................................... 295 4.33 Traversal................................................. 297 4.34 Vitality.................................................. 298 5 Functions 301 5.1 Graph................................................... 301 5.2 Nodes................................................... 303 5.3 Edges................................................... 305 5.4 Attributes................................................. 305 5.5 Freezing graph structure......................................... 307 6 Graph generators 309 6.1 Atlas................................................... 309 6.2 Classic.................................................. 309 6.3 Small................................................... 314 6.4 Random Graphs............................................. 318 6.5 Degree Sequence............................................. 327 6.6 Random Clustered............................................ 333 6.7 Directed................................................. 334 6.8 Geometric................................................ 337 6.9 Hybrid.................................................. 341 6.10 Bipartite................................................. 341 6.11 Line Graph................................................ 345 6.12 Ego Graph................................................ 346 6.13 Stochastic................................................. 347 6.14 Intersection................................................ 347 6.15 Social Networks............................................. 349 7 Linear algebra 351 7.1 Graph Matrix............................................... 351 7.2 Laplacian Matrix............................................. 352 7.3 Spectrum................................................. 355 7.4 Attribute Matrices............................................ 356 8 Converting to and from other data formats 361 8.1 To NetworkX Graph........................................... 361 8.2 Dictionaries................................................ 362 8.3 Lists................................................... 363 8.4 Numpy.................................................. 364 8.5 Scipy................................................... 367 9 Reading and writing graphs 369 9.1 Adjacency List.............................................. 369 9.2 Multiline Adjacency List......................................... 373 9.3 Edge List................................................. 376 9.4 GEXF................................................... 383 9.5 GML................................................... 385 9.6 Pickle................................................... 388 9.7 GraphML................................................. 389 ii 9.8 JSON................................................... 391 9.9 LEDA................................................... 397 9.10 YAML.................................................. 398 9.11 SparseGraph6.............................................. 399 9.12 Pajek................................................... 400 9.13 GIS Shapefile............................................... 402 10 Drawing 405 10.1 Matplotlib................................................ 405 10.2 Graphviz AGraph (dot).......................................... 413 10.3 Graphviz with pydot........................................... 416 10.4 Graph Layout............................................... 418 11 Exceptions 423 12 Utilities 425 12.1 Helper functions............................................. 425 12.2 Data structures and Algorithms..................................... 426 12.3 Random sequence generators...................................... 426 12.4 Decorators................................................ 429 13 License 431 14 Citing 433 15 Credits 435 16 Glossary 437 Bibliography 439 Python Module Index 449 Index 451 iii iv CHAPTER ONE OVERVIEW NetworkX is a Python language software package for the creation, manipulation, and study of the structure, dynamics, and function of complex networks. With NetworkX you can load and store networks in standard and nonstandard data formats, generate many types of random and classic networks, analyze network structure, build network models, design new network algorithms, draw networks, and much more. 1.1 Who uses NetworkX? The potential audience for NetworkX includes mathematicians, physicists, biologists, computer scientists, and social scientists. Good reviews of the state-of-the-art in the science of complex networks are presented in Albert and Barabási [BA02], Newman [Newman03], and Dorogovtsev and Mendes [DM03]. See also the classic texts [Bollobas01], [Diestel97] and [West01] for graph theoretic results and terminology. For basic graph algorithms, we recommend the texts of Sedgewick, e.g. [Sedgewick01] and [Sedgewick02] and the survey of Brandes and Erlebach [BE05]. 1.2 Goals NetworkX is intended to provide • tools for the study the structure and dynamics of social, biological, and infrastructure networks, • a standard programming interface and graph implementation that is suitable for many applications, • a rapid development environment for collaborative, multidisciplinary projects, • an interface to existing numerical algorithms and code written in C, C++, and FORTRAN, • the ability to painlessly slurp in large nonstandard data sets. 1.3 The Python programming language Python is a powerful programming language that allows simple and flexible representations of networks, and clear and concise expressions of network algorithms (and other algorithms too). Python has a vibrant and growing ecosystem of packages that NetworkX uses to provide more features such as numerical linear algebra and drawing. In addition Python is also an excellent “glue” language for putting together pieces of software from other languages which allows reuse of legacy code and engineering of high-performance algorithms [Langtangen04]. Equally important, Python is free, well-supported, and a joy to use. 1 NetworkX Reference, Release 1.8.1 In order to make the most out of NetworkX you will want to know how to write basic programs in Python. Among the many guides to Python, we recommend the documentation at http://www.python.org and the text by Alex Martelli [Martelli03]. 1.4 Free software NetworkX is free software; you can redistribute it and/or modify it under the terms of the BSD License. We welcome contributions from the community. Information on NetworkX development is found at the NetworkX Developer Zone at Github https://github.com/networkx/networkx 1.5 History NetworkX was born in May 2002. The original version was designed and written by Aric Hagberg, Dan
Recommended publications
  • Sagemath and Sagemathcloud
    Viviane Pons Ma^ıtrede conf´erence,Universit´eParis-Sud Orsay [email protected] { @PyViv SageMath and SageMathCloud Introduction SageMath SageMath is a free open source mathematics software I Created in 2005 by William Stein. I http://www.sagemath.org/ I Mission: Creating a viable free open source alternative to Magma, Maple, Mathematica and Matlab. Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 2 / 7 SageMath Source and language I the main language of Sage is python (but there are many other source languages: cython, C, C++, fortran) I the source is distributed under the GPL licence. Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 3 / 7 SageMath Sage and libraries One of the original purpose of Sage was to put together the many existent open source mathematics software programs: Atlas, GAP, GMP, Linbox, Maxima, MPFR, PARI/GP, NetworkX, NTL, Numpy/Scipy, Singular, Symmetrica,... Sage is all-inclusive: it installs all those libraries and gives you a common python-based interface to work on them. On top of it is the python / cython Sage library it-self. Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 4 / 7 SageMath Sage and libraries I You can use a library explicitly: sage: n = gap(20062006) sage: type(n) <c l a s s 'sage. interfaces .gap.GapElement'> sage: n.Factors() [ 2, 17, 59, 73, 137 ] I But also, many of Sage computation are done through those libraries without necessarily telling you: sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage : G . g a p () Group( [ (3,4), (1,2,3)(4,5) ] ) Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 5 / 7 SageMath Development model Development model I Sage is developed by researchers for researchers: the original philosophy is to develop what you need for your research and share it with the community.
    [Show full text]
  • Networkx Tutorial
    5.03.2020 tutorial NetworkX tutorial Source: https://github.com/networkx/notebooks (https://github.com/networkx/notebooks) Minor corrections: JS, 27.02.2019 Creating a graph Create an empty graph with no nodes and no edges. In [1]: import networkx as nx In [2]: G = nx.Graph() By definition, a Graph is a collection of nodes (vertices) along with identified pairs of nodes (called edges, links, etc). In NetworkX, nodes can be any hashable object e.g. a text string, an image, an XML object, another Graph, a customized node object, etc. (Note: Python's None object should not be used as a node as it determines whether optional function arguments have been assigned in many functions.) Nodes The graph G can be grown in several ways. NetworkX includes many graph generator functions and facilities to read and write graphs in many formats. To get started though we'll look at simple manipulations. You can add one node at a time, In [3]: G.add_node(1) add a list of nodes, In [4]: G.add_nodes_from([2, 3]) or add any nbunch of nodes. An nbunch is any iterable container of nodes that is not itself a node in the graph. (e.g. a list, set, graph, file, etc..) In [5]: H = nx.path_graph(10) file:///home/szwabin/Dropbox/Praca/Zajecia/Diffusion/Lectures/1_intro/networkx_tutorial/tutorial.html 1/18 5.03.2020 tutorial In [6]: G.add_nodes_from(H) Note that G now contains the nodes of H as nodes of G. In contrast, you could use the graph H as a node in G.
    [Show full text]
  • Networkx: Network Analysis with Python
    NetworkX: Network Analysis with Python Salvatore Scellato Full tutorial presented at the XXX SunBelt Conference “NetworkX introduction: Hacking social networks using the Python programming language” by Aric Hagberg & Drew Conway Outline 1. Introduction to NetworkX 2. Getting started with Python and NetworkX 3. Basic network analysis 4. Writing your own code 5. You are ready for your project! 1. Introduction to NetworkX. Introduction to NetworkX - network analysis Vast amounts of network data are being generated and collected • Sociology: web pages, mobile phones, social networks • Technology: Internet routers, vehicular flows, power grids How can we analyze this networks? Introduction to NetworkX - Python awesomeness Introduction to NetworkX “Python package for the creation, manipulation and study of the structure, dynamics and functions of complex networks.” • Data structures for representing many types of networks, or graphs • Nodes can be any (hashable) Python object, edges can contain arbitrary data • Flexibility ideal for representing networks found in many different fields • Easy to install on multiple platforms • Online up-to-date documentation • First public release in April 2005 Introduction to NetworkX - design requirements • Tool to study the structure and dynamics of social, biological, and infrastructure networks • Ease-of-use and rapid development in a collaborative, multidisciplinary environment • Easy to learn, easy to teach • Open-source tool base that can easily grow in a multidisciplinary environment with non-expert users
    [Show full text]
  • Graph Database Fundamental Services
    Bachelor Project Czech Technical University in Prague Faculty of Electrical Engineering F3 Department of Cybernetics Graph Database Fundamental Services Tomáš Roun Supervisor: RNDr. Marko Genyk-Berezovskyj Field of study: Open Informatics Subfield: Computer and Informatic Science May 2018 ii Acknowledgements Declaration I would like to thank my advisor RNDr. I declare that the presented work was de- Marko Genyk-Berezovskyj for his guid- veloped independently and that I have ance and advice. I would also like to thank listed all sources of information used Sergej Kurbanov and Herbert Ullrich for within it in accordance with the methodi- their help and contributions to the project. cal instructions for observing the ethical Special thanks go to my family for their principles in the preparation of university never-ending support. theses. Prague, date ............................ ........................................... signature iii Abstract Abstrakt The goal of this thesis is to provide an Cílem této práce je vyvinout webovou easy-to-use web service offering a database službu nabízející databázi neorientova- of undirected graphs that can be searched ných grafů, kterou bude možno efektivně based on the graph properties. In addi- prohledávat na základě vlastností grafů. tion, it should also allow to compute prop- Tato služba zároveň umožní vypočítávat erties of user-supplied graphs with the grafové vlastnosti pro grafy zadané uži- help graph libraries and generate graph vatelem s pomocí grafových knihoven a images. Last but not least, we implement zobrazovat obrázky grafů. V neposlední a system that allows bulk adding of new řadě je také cílem navrhnout systém na graphs to the database and computing hromadné přidávání grafů do databáze a their properties.
    [Show full text]
  • Networkx Reference Release 1.9.1
    NetworkX Reference Release 1.9.1 Aric Hagberg, Dan Schult, Pieter Swart September 20, 2014 CONTENTS 1 Overview 1 1.1 Who uses NetworkX?..........................................1 1.2 Goals...................................................1 1.3 The Python programming language...................................1 1.4 Free software...............................................2 1.5 History..................................................2 2 Introduction 3 2.1 NetworkX Basics.............................................3 2.2 Nodes and Edges.............................................4 3 Graph types 9 3.1 Which graph class should I use?.....................................9 3.2 Basic graph types.............................................9 4 Algorithms 127 4.1 Approximation.............................................. 127 4.2 Assortativity............................................... 132 4.3 Bipartite................................................. 141 4.4 Blockmodeling.............................................. 161 4.5 Boundary................................................. 162 4.6 Centrality................................................. 163 4.7 Chordal.................................................. 184 4.8 Clique.................................................. 187 4.9 Clustering................................................ 190 4.10 Communities............................................... 193 4.11 Components............................................... 194 4.12 Connectivity..............................................
    [Show full text]
  • Exploring Network Structure, Dynamics, and Function Using Networkx
    Proceedings of the 7th Python in Science Conference (SciPy 2008) Exploring Network Structure, Dynamics, and Function using NetworkX Aric A. Hagberg ([email protected])– Los Alamos National Laboratory, Los Alamos, New Mexico USA Daniel A. Schult ([email protected])– Colgate University, Hamilton, NY USA Pieter J. Swart ([email protected])– Los Alamos National Laboratory, Los Alamos, New Mexico USA NetworkX is a Python language package for explo- and algorithms, to rapidly test new hypotheses and ration and analysis of networks and network algo- models, and to teach the theory of networks. rithms. The core package provides data structures The structure of a network, or graph, is encoded in the for representing many types of networks, or graphs, edges (connections, links, ties, arcs, bonds) between including simple graphs, directed graphs, and graphs nodes (vertices, sites, actors). NetworkX provides ba- with parallel edges and self-loops. The nodes in Net- sic network data structures for the representation of workX graphs can be any (hashable) Python object simple graphs, directed graphs, and graphs with self- and edges can contain arbitrary data; this flexibil- loops and parallel edges. It allows (almost) arbitrary ity makes NetworkX ideal for representing networks objects as nodes and can associate arbitrary objects to found in many different scientific fields. edges. This is a powerful advantage; the network struc- In addition to the basic data structures many graph ture can be integrated with custom objects and data algorithms are implemented for calculating network structures, complementing any pre-existing code and properties and structure measures: shortest paths, allowing network analysis in any application setting betweenness centrality, clustering, and degree dis- without significant software development.
    [Show full text]
  • Robustness and Assortativity for Diffusion-Like Processes in Scale
    epl draft Robustness and Assortativity for Diffusion-like Processes in Scale- free Networks G. D’Agostino1, A. Scala2,3, V. Zlatic´4 and G. Caldarelli5,3 1 ENEA - CR ”Casaccia” - Via Anguillarese 301 00123, Roma - Italy 2 CNR-ISC and Department of Physics, University of Rome “Sapienza” P.le Aldo Moro 5 00185 Rome, Italy 3 London Institute of Mathematical Sciences, 22 South Audley St Mayfair London W1K 2NY, UK 4 Theoretical Physics Division, Rudjer Boˇskovi´cInstitute, P.O.Box 180, HR-10002 Zagreb, Croatia 5 IMT Lucca Institute for Advanced Studies, Piazza S. Ponziano 6, Lucca, 55100, Italy PACS 89.75.Hc – Networks and genealogical trees PACS 05.70.Ln – Nonequilibrium and irreversible thermodynamics PACS 87.23.Ge – Dynamics of social systems Abstract – By analysing the diffusive dynamics of epidemics and of distress in complex networks, we study the effect of the assortativity on the robustness of the networks. We first determine by spectral analysis the thresholds above which epidemics/failures can spread; we then calculate the slowest diffusional times. Our results shows that disassortative networks exhibit a higher epidemi- ological threshold and are therefore easier to immunize, while in assortative networks there is a longer time for intervention before epidemic/failure spreads. Moreover, we study by computer sim- ulations the sandpile cascade model, a diffusive model of distress propagation (financial contagion). We show that, while assortative networks are more prone to the propagation of epidemic/failures, degree-targeted immunization policies increases their resilience to systemic risk. Introduction. – The heterogeneity in the distribu- propagation of an epidemic [13–15].
    [Show full text]
  • Constructions and Enumeration Methods for Cubic Graphs and Trees
    Butler University Digital Commons @ Butler University Undergraduate Honors Thesis Collection Undergraduate Scholarship 2013 Constructions and Enumeration Methods for Cubic Graphs and Trees Erica R. Gilliland Butler University Follow this and additional works at: https://digitalcommons.butler.edu/ugtheses Part of the Discrete Mathematics and Combinatorics Commons Recommended Citation Gilliland, Erica R., "Constructions and Enumeration Methods for Cubic Graphs and Trees" (2013). Undergraduate Honors Thesis Collection. 360. https://digitalcommons.butler.edu/ugtheses/360 This Thesis is brought to you for free and open access by the Undergraduate Scholarship at Digital Commons @ Butler University. It has been accepted for inclusion in Undergraduate Honors Thesis Collection by an authorized administrator of Digital Commons @ Butler University. For more information, please contact [email protected]. BUTLER UNIVERSITY HONORS PROGRAM Honors Thesis Certification Please type all information in this section: Applicant Erica R. Gilliland (Name as it is to appear on diploma) Thesis title Constructions and Enumeration Methods for Cubic Graphs and Trees Intended date of commencement May 11, 2013 --~------------------------------ Read, approved, and signed by: tf -;t 'J,- J IJ Thesis adviser(s) D'rt/~ S// CWiV'-~ Date Date t.-t - 2. Z - 2.C?{3 Reader(s) Date Date Certified by Director, Honors Program Date For Honors Program use: Level of Honors conferred: University Departmental MtH1t£W1Ah"LS with ttijutt HoVJQ(5 ik1vrj,,1 r"U)U ",1-111 ttlStl HMbCS V(IIVet>i}\j HtlYlb6 froyrltm I Constructions and Enumeration Methods for Cubic Graphs and Trees Erica R. Gilliland A Thesis Presented to the Department of Mathematics College of Liberal Arts and Sciences and Honors Program of Butler University III Partial Fulfillment of the ncCIuirclllcnts for G rae! ua lion Honors Submitted: April 2:3, 2()1:3 Constructions and Enumeration Methods for Cubic Graphs and Trees Erica It Gilliland Under the supervision of Dr.
    [Show full text]
  • Ollivier Ricci Curvature of Directed Hypergraphs Marzieh Eidi1* & Jürgen Jost1,2
    www.nature.com/scientificreports OPEN Ollivier Ricci curvature of directed hypergraphs Marzieh Eidi1* & Jürgen Jost1,2 Many empirical networks incorporate higher order relations between elements and therefore are naturally modelled as, possibly directed and/or weighted, hypergraphs, rather than merely as graphs. In order to develop a systematic tool for the statistical analysis of such hypergraph, we propose a general defnition of Ricci curvature on directed hypergraphs and explore the consequences of that defnition. The defnition generalizes Ollivier’s defnition for graphs. It involves a carefully designed optimal transport problem between sets of vertices. While the defnition looks somewhat complex, in the end we shall be able to express our curvature in a very simple formula, κ = µ0 − µ2 − 2µ3 . This formula simply counts the fraction of vertices that have to be moved by distances 0, 2 or 3 in an optimal transport plan. We can then characterize various classes of hypergraphs by their curvature. Principles of network analysis. Network analysis constitutes one of the success stories in the study of complex systems3,6,11. For the mathematical analysis, a network is modelled as a (perhaps weighted and/or directed) graph. One can then look at certain graph theoretical properties of an empirical network, like its degree or motiv distribution, its assortativity or clustering coefcient, the spectrum of its Laplacian, and so on. One can also compare an empirical network with certain deterministic or random theoretical models. Successful as this analysis clearly is, we nevertheless see two important limitations. One is that many of the prominent concepts and quantities used in the analysis of empirical networks are node based, like the degree sequence.
    [Show full text]
  • Assortativity and Mixing
    Assortativity and Assortativity and Mixing General mixing between node categories Mixing Assortativity and Mixing Definition Definition I Assume types of nodes are countable, and are Complex Networks General mixing General mixing Assortativity by assigned numbers 1, 2, 3, . Assortativity by CSYS/MATH 303, Spring, 2011 degree degree I Consider networks with directed edges. Contagion Contagion References an edge connects a node of type µ References e = Pr Prof. Peter Dodds µν to a node of type ν Department of Mathematics & Statistics Center for Complex Systems aµ = Pr(an edge comes from a node of type µ) Vermont Advanced Computing Center University of Vermont bν = Pr(an edge leads to a node of type ν) ~ I Write E = [eµν], ~a = [aµ], and b = [bν]. I Requirements: X X X eµν = 1, eµν = aµ, and eµν = bν. µ ν ν µ Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. 1 of 26 4 of 26 Assortativity and Assortativity and Outline Mixing Notes: Mixing Definition Definition General mixing General mixing Assortativity by I Varying eµν allows us to move between the following: Assortativity by degree degree Definition Contagion 1. Perfectly assortative networks where nodes only Contagion References connect to like nodes, and the network breaks into References subnetworks. General mixing P Requires eµν = 0 if µ 6= ν and µ eµµ = 1. 2. Uncorrelated networks (as we have studied so far) Assortativity by degree For these we must have independence: eµν = aµbν . 3. Disassortative networks where nodes connect to nodes distinct from themselves. Contagion I Disassortative networks can be hard to build and may require constraints on the eµν.
    [Show full text]
  • Extraction and Analysis of Facebook Friendship Relations
    Chapter 12 Extraction and Analysis of Facebook Friendship Relations Salvatore Catanese, Pasquale De Meo, Emilio Ferrara, Giacomo Fiumara, and Alessandro Provetti Abstract Online social networks (OSNs) are a unique web and social phenomenon, affecting tastes and behaviors of their users and helping them to maintain/create friendships. It is interesting to analyze the growth and evolution of online social networks both from the point of view of marketing and offer of new services and from a scientific viewpoint, since their structure and evolution may share similarities with real-life social networks. In social sciences, several techniques for analyzing (off-line) social networks have been developed, to evaluate quantitative properties (e.g., defining metrics and measures of structural characteristics of the networks) or qualitative aspects (e.g., studying the attachment model for the network evolution, the binary trust relationships, and the link prediction problem). However, OSN analysis poses novel challenges both to computer and Social scientists. We present our long-term research effort in analyzing Facebook, the largest and arguably most successful OSN today: it gathers more than 500 million users. Access to data about Facebook users and their friendship relations is restricted; thus, we acquired the necessary information directly from the front end of the website, in order to reconstruct a subgraph representing anonymous interconnections among a significant subset of users. We describe our ad hoc, privacy-compliant crawler for Facebook data extraction. To minimize bias, we adopt two different graph mining techniques: breadth-first-search (BFS) and rejection sampling. To analyze the structural properties of samples consisting of millions of nodes, we developed a S.Catanese•P.DeMeo•G.Fiumara Department of Physics, Informatics Section.
    [Show full text]
  • The Perceived Assortativity of Social Networks: Methodological Problems and Solutions
    The perceived assortativity of social networks: Methodological problems and solutions David N. Fisher1, Matthew J. Silk2 and Daniel W. Franks3 Abstract Networks describe a range of social, biological and technical phenomena. An important property of a network is its degree correlation or assortativity, describing how nodes in the network associate based on their number of connections. Social networks are typically thought to be distinct from other networks in being assortative (possessing positive degree correlations); well-connected individuals associate with other well-connected individuals, and poorly-connected individuals associate with each other. We review the evidence for this in the literature and find that, while social networks are more assortative than non-social networks, only when they are built using group-based methods do they tend to be positively assortative. Non-social networks tend to be disassortative. We go on to show that connecting individuals due to shared membership of a group, a commonly used method, biases towards assortativity unless a large enough number of censuses of the network are taken. We present a number of solutions to overcoming this bias by drawing on advances in sociological and biological fields. Adoption of these methods across all fields can greatly enhance our understanding of social networks and networks in general. 1 1. Department of Integrative Biology, University of Guelph, Guelph, ON, N1G 2W1, Canada. Email: [email protected] (primary corresponding author) 2. Environment and Sustainability Institute, University of Exeter, Penryn Campus, Penryn, TR10 9FE, UK Email: [email protected] 3. Department of Biology & Department of Computer Science, University of York, York, YO10 5DD, UK Email: [email protected] Keywords: Assortativity; Degree assortativity; Degree correlation; Null models; Social networks Introduction Network theory is a useful tool that can help us explain a range of social, biological and technical phenomena (Pastor-Satorras et al 2001; Girvan and Newman 2002; Krause et al 2007).
    [Show full text]