123
Social Network Analysis What it is, what we can learn from it, and how we can do it

Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Embed Size (px)

Citation preview

Page 1: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Social Network AnalysisWhat it is, what we can learn from it, and how we can do it

Page 2: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Backstrom & Kleinberg, 2014

Page 3: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Predict your partner

1.3m users in a relationship, 379m people, 8.6b connections

Page 4: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Predict your partner

1.3m users, 379m people, 8.6b connections

Accuracy: 60%

Page 5: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Andris et al., PLoS ONE, 2015

Page 6: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

What is it?

Page 7: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 8: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 9: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 10: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Social networks connect people

Page 11: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Social network

A social structure that represents the relationships between people

Page 12: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Social network

A graph model that represents the dyadic relationships between people

Page 13: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 14: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Nodes and Edges

Page 15: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Nodes and Edges

Page 16: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Nodes and Edges

Page 17: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Nodes and Edges

Page 18: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 19: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Network

A graph model that represents the dyadic relationships between entities

Page 20: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 21: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Ahn et al.,Sci. Rep., 2011

Page 22: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Weighted network

Links can have a weight

Page 23: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Directed network

Links can be directed

Page 24: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Rosvall & Bergstrom,PNAS, 2009

Page 25: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Network = Graph

Page 26: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Network analysis = Graph theory

Page 27: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Network analysis= Graph

theory+statistics+physics

Page 28: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

What can we learn from it?

Page 29: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Six degrees of separation

80-20 rule of social popularity

Page 30: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Grouping: Group similar people together

Ranking: Find the most influential people

Page 31: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Six degrees of separation

Page 32: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Six degrees of separationAny person in the world needs only to take at most six steps to reach any other person

Page 33: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

How to measure how separated we are?

Page 34: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Diameter

Longest shortest path among all pairs

How many steps a person has to take to reach anyone

Page 35: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 36: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 37: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Average path length

Shortest path lengths averaged among all possible pairs

Page 38: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

The small-world network

Page 39: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 40: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 41: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 42: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 43: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Small-world network

Page 44: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Milgram’s experiment

Omaha & Wichita -> Boston

64 out of 296 reached destination

Average path length 5.5

Page 45: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Watt’s Experiments

60,000 email users to reach 18 targets in 13 countries

Dodds et al., Science, 2003

Page 46: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Back-of-the-envelope calculation

Page 47: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Back-of-the-envelope calculation

Page 48: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Erdos number

Mathematicians’ co-publishing network

Average path length – 4.65

Page 49: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Bacon number

Actors’ co-starring network

Average path length – 3.65

Page 50: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 51: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

1

Page 52: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

2

1

Page 53: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

(some mathematicians and papers thatnobody cares

about)

Page 54: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

5

2

Page 55: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 56: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Be nice to the old lady slowly crossing the street

Page 57: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

80-20 rule of social popularity

Page 58: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 59: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

How to measure the popularity of the nodes?

Page 60: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Degree distribution

The probability distribution of the number of links of a node

Page 61: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 62: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

N=10000, p=0.02

Page 63: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Degree distribution

http://en.wikipedia.org/wiki/Erdos-Renyi_model

Page 64: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

What does a real network look like?

Page 65: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Mahadevan et al., SIGCOMM, 2007

Page 66: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Newman, SIAM Review, 2003

Page 67: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Power-law distribution

Page 68: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Theory vs Reality

H. Jeong et. al, Nature (2000)

Page 69: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Power-law distribution

Long-tail distribution: Nodes with extremely large number of links have non-trivial chance to appear

Page 70: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Power-law distribution

80-20 rule of social network: A minority of nodes have a majority of links

Page 71: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 72: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

What’s wrong with the random network model?

Page 73: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Barabasi-Albert model

When a new node joins the network, it connects to popular existing nodes

Page 74: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Barabasi-Albert model

When a new node joins the network, it connects to popular existing nodes

The probability is proportional to the existing node’s number of links

Page 75: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 76: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Scale-free network

Matthew Effect: Richer-get-richer

Links is the “wealth” in social network

Page 77: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Like wealth, social popularity follows 80-20 rule

Page 78: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Rank the nodes according to their important

Page 79: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

PageRank

Relative importance of nodes

Page 80: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

PageRank

Probability of opening a page when surfing the Internet

Page 81: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

PageRank

Probability of arriving at this page from other pages that link to it

Page 82: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

PageRank

Probability of arriving at this page from other pages that link to it, or randomly opening this page

Page 83: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 84: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 85: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 86: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Group similar nodes together

Page 87: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 88: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Communities

Friends from middle school, college, and work

How do we group them?

Page 89: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Guimera & Amaral, Nature, 2005

Page 90: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

How to measure the tendency to form communities?

Page 91: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Modularity

How well the network can be separated into modules

Page 92: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

For every module,

Page 93: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

For every module, calculate the number of links within the module

Page 94: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

For every module, calculate the number of links within the module, minus its expectation

Page 95: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Compare to its expectation

Page 96: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Maximize modularity

NP hard

Simulated annealing: slow, accurate

Louvain method: greedy, fast, local-minimum

Page 97: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 98: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 99: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Guimera et al., PNAS, 2005

Page 100: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 101: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 102: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Dynamics on network

SIR model in NetLogo

Page 103: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Multiplex network

Facebook, Twitter, LinkedIn

Page 104: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Radicchi & Arenas, Nature Physics, 2014

Page 105: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

De Domenico et al., PNAS, 2014

Page 106: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

How do we do it?

Page 107: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Python + Spark

networkxmatplotlibpyspark

Page 108: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Co-purchase network

Who bought the same deals as you did?

Page 109: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Data

User 1, Deal AUser 1, Deal BUser 1, Deal CUser 2, Deal AUser 3, Deal B…

Page 110: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

1 A

2 B

3 C

4 D

Page 111: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

1 A

2 B

3 C

4 D

Page 112: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

1 A

2 B

3 C

4 D

Page 113: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

1

2

3

4

Page 114: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

1

2

34

Page 115: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

IPython notebook

Page 116: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 117: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Diameter: 6

Average path length: 2.57

Page 118: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 119: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Largest groups

Group 1- 395 females, 201 males- Average age: 42.4

Group 2- 228 females, 83 males- Average age: 38.9

Group 3- 51 females, 27 males- Average age: 34.1

Page 120: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Group 1 vs 2: p-value = 0.001Group 1 vs 3: p-value < 0.001Group 2 vs 3: p-value < 0.001

Page 121: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It
Page 122: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

IPython notebook

Examples of networks:https://github.com/zengxiaohanzxh/networks-ipython.git

Groupon example: [email protected]:zengxiaohanzxh/networks.git

Page 123: Social Network Analysis: What It Is, Why We Should Care, and What We Can Learn From It

Xiaohan Zeng <[email protected]>

Quantum Lead, 6th floor near Fishbowl