logo资料库

python图和社交网络分析.pdf

第1页 / 共214页
第2页 / 共214页
第3页 / 共214页
第4页 / 共214页
第5页 / 共214页
第6页 / 共214页
第7页 / 共214页
第8页 / 共214页
资料共214页,剩余部分请下载后查看
Preface
New Age of Web Usage
Learn, in Simple Words, Theory and Practice of Social Network Analysis
Contents
Chapter 1: Theoretical Concepts of Network Analysis
1.1 Sociological Meaning of Network Relations
1.2 Network Measurements
1.2.1 Network Connection
1.2.2 Transitivity
1.2.3 Multiplexity
1.2.4 Homophily
1.2.5 Dyads and Mutuality
1.2.6 Balance and Triads
1.2.7 Reciprocity
1.3 Network Distribution
1.3.1 Distance Between Two Nodes
1.3.2 Degree Centrality
1.3.3 Closeness Centrality
1.3.4 Betweenness Centrality
1.3.5 Eigenvector Centrality
1.3.6 PageRank
1.3.7 Geodesic Distance and Shortest Path
1.3.8 Eccentricity
1.3.9 Density
1.4 Network Segmentation
1.4.1 Cohesive Subgroups
1.4.2 Cliques
1.4.3 K-Cores
1.4.4 Clustering Coefficient
1.4.5 Core/Periphery
1.4.6 Blockmodels
1.4.7 Hierarchical Clustering
1.5 Recent Developments in Network Analysis
1.5.1 Community Detection
1.5.2 Link Prediction
1.5.3 Spatial Networks
1.5.4 Protein-Protein Interaction Networks
1.5.5 Recommendation Systems
1.6 iGraph
Chapter 2: Network Basics
2.1 What Is a Network?
2.2 Types of Networks
2.3 Properties of Networks
2.4 Network Measures
2.5 NetworkX
2.6 Installation
2.7 Matrices
2.8 Types of Matrices in Social Networks
2.8.1 Adjacency Matrix
2.8.2 Edge List Matrix
2.8.3 Adjacency List
2.8.4 Numpy Matrix
2.8.5 Sparse Matrix
2.9 Basic Matrix Operations
2.10 Data Visualization
Chapter 3: Graph Theory
3.1 Origins of Graph Theory
3.2 Graph Basics
3.3 Vertices
3.4 Types of Graphs
3.5 Graph Traversals
3.5.1 Depth-First Traversal (DFS)
3.5.2 Breadth-First Traversal (BFS)
3.5.3 Dijkstra’s Algorithm
3.6 Operations on Graphs
Reference
Chapter 4: Social Networks
4.1 Social Networks
4.2 Properties of a Social Network
4.2.1 Scale-Free Networks
4.2.2 Small-World Networks
4.2.3 Network Navigation
4.2.4 Dunbar’s Number
4.3 Data Collection in Social Networks
4.4 Six Degrees of Separation
4.5 Online Social Networks
4.6 Online Social Data Collection
4.7 Data Sampling
4.8 Social Network Analysis
4.9 Social Network Analysis vs. Link Analysis
4.10 Historical Development
4.11 Importance of Social Network Analysis
4.12 Social Network Analysis Modeling Tools
References
Chapter 5: Node-Level Analysis
5.1 Ego-Network Analysis
5.2 Identifying Influential Individuals in the Network
5.2.1 Degree Centrality
5.2.2 Closeness Centrality
5.2.3 Betweenness Centrality
5.2.4 Eigenvector Centrality
5.3 PageRank
5.4 Neighbors
5.5 Bridges
5.6 Which Centrality Algorithm to Use?
Chapter 6: Group-Level Analysis
6.1 Cohesive Subgroups
6.2 Cliques
6.3 Clustering Coefficient
6.4 Triadic Analysis
6.5 Structural Holes
6.6 Brokerage
6.7 Transitivity
6.8 Coreness
6.9 Overlapping Communities
6.10 Dynamic Community Finding
6.11 M-Slice
6.12 K-Cores
6.13 Community Detection
6.13.1 Graph Partitioning
6.13.2 Hierarchical Clustering
6.14 Blockmodels
6.14.1 Modularity Optimization
6.15 The Louvain Method
Reference
Chapter 7: Network-Level Analysis
7.1 Components/Isolates
7.2 Core/Periphery
7.3 Density
7.4 Shortest Path
7.5 Reciprocity
7.6 Affiliation Networks
7.7 Two-Mode Networks
7.8 Homophily
Chapter 8: Information Diffusion in Social Networks
8.1 Diffusion
8.2 Contagion
8.3 Diffusion of Innovation
8.4 Adoption of Innovations
8.5 Diffusion of Innovation Models
8.6 Two-Step Flow Model
8.7 Social Contagion
8.8 Adoption Rate
8.9 Adoption Categories and Thresholds
8.10 Amount of Exposure
8.11 Adopters and Adoption
8.12 Critical Mass
8.13 Epidemics
8.14 Epidemic Models
8.15 Deterministic Compartmental Models
8.16 SIR Model
8.17 Properties of the SIR Model
Appendices
Appendix A: Python 3.x Quick Syntax Guide
Python Syntax
Variables
Numbers
Strings
Lists
Tuples
Dictionaries
Conditionals
Loops
Python Functions
File Handling
Exception Handling
Modules
Classes
Appendix B: NetworkX Tutorial
Graph Types
Nodes
Edges
Directed Graphs
Attributed Graphs
Weighted Graphs
Multigraphs
Classic Graph Operations
Graph Generators
Basic Network Analysis
Centrality Measures
Drawing Graphs
Algorithms Package (NetworkX Algorithms)
Reading and Writing
References
Bibliography
Advanced Information and Knowledge Processing MohammedZuhairAl-Taie SeifedineKadry Python for Graph and Network Analysis
Advanced Information and Knowledge Processing Series editors Lakhmi C. Jain Bournemouth University, Poole, UK and University of South Australia, Adelaide, Australia Xindong Wu University of Vermont
Information systems and intelligent knowledge processing are playing an increasing role in business, science and technology. Recently, advanced information systems have evolved to facilitate the co-evolution of human and information networks within communities. These advanced information systems use various paradigms including artificial intelligence, knowledge management, and neural science as well as conventional information processing paradigms. The aim of this series is to publish books on new designs and applications of advanced information and knowledge processing paradigms in areas including but not limited to aviation, business, security, education, engineering, health, management, and science. Books in the series should have a strong focus on information processing—preferably combined with, or extended by, new results from adjacent sciences. Proposals for research monographs, reference books, coherently integrated multi-author edited books, and handbooks will be considered for the series and each proposal will be reviewed by the Series Editors, with additional reviews from the editorial board and independent reviewers where appropriate. Titles published within the Advanced Information and Knowledge Processing series are included in Thomson Reuters’ Book Citation Index. More information about this series at http://www.springer.com/series/4738
Mohammed Zuhair Al-Taie • Seifedine Kadry Python for Graph and Network Analysis
Mohammed Zuhair Al-Taie Faculty of Computing Universiti Teknologi Malaysia Kuala Lumpur, Malaysia Seifedine Kadry School of Engineering and Technology American University of the Middle East Kuwait ISSN 1610-3947 Advanced Information and Knowledge Processing ISBN 978-3-319-53003-1 DOI 10.1007/978-3-319-53004-8 ISSN 2197-8441 ISBN 978-3-319-53004-8 (eBook) (electronic) Library of Congress Control Number: 2017935544 © Springer International Publishing AG 2017 This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, express or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Printed on acid-free paper This Springer imprint is published by Springer Nature The registered company is Springer International Publishing AG The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
Preface New Age of Web Usage The fast developments in the Web and Internet in the last decade and the advance- ments in computing and communication have drawn people in innovative ways. Huge participatory social sites have emerged, empowering new shapes of collabora- tion communication. Sites, such as Twitter, Facebook, LinkedIn, and Myspace, allow people to make new virtual relationships. Wikis, blogs, and video blogs pro- vide users with convenience and assistance in every possible way to help them pub- lish their ideas and thoughts, no need to worry about publishing costs. A tremendous number of volunteers can today write articles and share photos, videos, and links at a scope and scale never imagined before. Product recommendations provided by online marketplaces such as eBay and Amazon (after analyzing user behavior) can tempt online consumers to make more orders. Tagging mechanisms on the Web help users to express their preferences. Sending and receiving e-mails, visiting a Webpage, or posting a comment on a blog site leaves a digital footprint that can be traced back to the person or group behind it. Political movements can also use the Web today to create new forms of collaboration between supporters. All these changes would not have taken place without the help of Web 2.0 tech- nology—a term coined by Tim O’Reilly to show that Internet users are more pre- pared than before to reformulate the Web content. Social networking is a major factor in the emergence of such interactions since most Internet users are players of social sites and use them regularly and actively. Recent studies have shown that social networking has become one of three popu- lar uses of the Internet, alongside the Internet search and e-mail, which points to the importance of this social trend and the role it plays in communities. In the study of social networks, social network analysis makes an interesting interdisciplinary research area, where computer scientists and sociologists bring their competence to a level that will enable them to meet the challenges of this fast- developing field. Computer scientists have the knowledge to parse and process data, v
vi Preface while sociologists have the experience that is required for efficient data editing and interpretation. Social network analysis techniques, which are included in this book, will help readers to efficiently analyze social data from Twitter, Facebook, LiveJournal, GitHub, and many others at three levels of depth: ego, group, and community. They will be able to analyze militant and revolutionary networks and candidate networks during elections. They will even learn how the Ebola virus spread through communities. Social network analysis was successfully applied in different fields such as health, cyber security, business, animal social networks, information retrieval, and communications. For example, in animal social networks, social network analysis was used to investigate relationships and social structures of animal gatherings and the direct and indirect interactions between animal groups. It was also applied by security agencies, particularly after the 9/11/2001 attacks, to study the structure and dynamics of militant groups. Learn, in Simple Words, Theory and Practice of Social Network Analysis This is a book on graph and network analysis integrating theory and applications for performing the analysis. Step by step, the book introduces the main structural con- cepts and their applications in social research. It is aimed at tackling problems on graphs and social networks by exploring tens of examples ranging in difficulty from simple to intermediate, which makes the book a practical introduction to the field. In each of the eight chapters (except for chapter one), each theoretical section is followed by examples explaining how to perform graph and network analysis with Python, a general-purpose programming language that is becoming more and more popular to do data science. Companies worldwide are using Python to harvest insights from their data and get a competitive edge. The book also includes the use of NetworkX library, a Python language software package and an open-source tool for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks. Side by side with Matplotlib package for data visualization, these three open source tools are used to analyze and visualize social data. In the end, the reader has the knowledge, skills, and tools to apply social network analysis in all reachable fields, ranging from social media to business administration and history. The book is intended for readers who want to learn theory and practice of graph and network analysis using a programming language, which is Python, without going too far into its mathematical or statistical methods. In fact, the book is suit- able for courses on social network analysis in all disciplines that use social methodology. We believe that many of the readers are more interested in the imple- mentation of social network analysis than in its mathematical properties.
Preface vii The book contains eight chapters. Chapter 1: Theoretical Concepts of Network Analysis. This is the longest chapter, it gives an introduction to the major theoretical concepts of network analysis, with emphasis on these used throughout this book. Chapter 2: Graph theory. This chapter presents the main features of graph theory, the mathematical study of the application and properties of graphs, initially moti- vated by the study of games of chance. It addresses topics such as origins of graph theory, graph basics, types of graphs, graph traversals, and types of operations on graphs. Chapter 3: Network basics. This chapter introduces the concept of a network, which is, of course, the core object of network analysis. We will discuss topics such as types of networks, network measures, installation and use of NetworkX library, network data representation, basic matrix operations, and data visualization. Chapter 4: Social networks. This chapter introduces the main concepts of social networks such as properties of social networks, data collection in social networks, data sampling, and social network analysis. Chapter 5: Node-level analysis. This chapter is concerned with building an understanding of how to do network analysis at the node (ego) level. It shows how to create social networks from scratch, how to import networks, how to find key players in social networks using centrality measures, and how to visualize networks. We will also introduce the important algorithms that are used to gain insights from graphs. Chapter 6: Group-level analysis. In this chapter, we are going to present a num- ber of techniques for detecting cohesive groups in networks such as cliques, cluster- ing coefficient, triadic analysis, structural holes, brokerage, transitivity, hierarchical clustering, and blockmodels, all of which are based on how nodes in a network interconnect. However, among all, cohesion and brokerage types of analysis are two major research topics in social network analysis. Chapter 7: Network-level analysis. In this chapter, we are going to study graphs and networks as a whole, which is different from what we have done in the previous chapters when we analyzed graphs at the node level and the group level. Hence, this chapter addresses concepts such as components and isolates, cores and periphery, network density, shortest paths, reciprocity, affiliation networks and two-mode net- works, and homophily. Chapter 8: Information diffusion in social networks. This chapter discusses con- cepts of information diffusion in social networks. Information diffusion methods are commonly used in viral marketing, in collaborative filtering systems, in emer- gency management, in community detection, and in the study of citation networks. Johor, Malaysia Egaila, Kuwait Mohammed Zuhair Al-Taie Seifedine Kadry
分享到:
收藏