SlideShare una empresa de Scribd logo
1 de 36
Networks
           Part I

            Sharad Goel
        Columbia University
Computational Social Science: Lecture 5

          February 22, 2013
High School Dating Network
[ Bearman, Moody, & Stovel, 2004 ]
Image by Mark Newman, via Easley & Kleinberg
Corporate E-mail Communication
[ Adamic & Adar, 2004 ]
via Easley & Kleinberg
“Internet map 2004” from Math Insight
http://mathinsight.org/image/internet_map_jurvetson_2004
Networks/Graphs

             Nodes/vertices
people, organizations, webpages, computers

                  Edges
represent connections between pairs of nodes
2            5

                11
                     1
4       9

            6            2
1                   2

                        4
                6                4
2   1
            2
                                 3
                    7
                            13
3
1       2


                5

    4

                            1   2   3   4   5   6   7
                    7   1   0   1   0   1   0   0   0
            6
                        2   1   0   1   0   1   0   0
                        3   0   1   0   0   1   0   0
                        4   1   0   0   0   1   0   0
                        5   0   1   1   1   0   1   1
                        6   0   0   0   0   1   0   0
                        7   0   0   0   0   1   0   0
3
1       2


                5

    4


                    7   1   {2, 4}
            6
                        2   {1, 3, 5}
                        3   {2, 5}
                        4   {1, 5}
                        5   {2, 3, 4, 6, 7}
                        6   {5}
                        7   {5}
3
1       2


                5

    4

                        (1, 2)
                    7   (1, 4)
            6
                        (2, 3)
                        (2, 5)
                        (3, 5)
                        (4, 5)
                        (5, 6)
                        (5, 7)
2                   5           3
1               2
                        11
                                1
4           9           5

    4                               2
                6

                                        7
                    6                       1   {2:2, 4:4}
                                            2   {1:2, 3:5, 5:11}
                                            3   {2:5, 5:1}
                                            4   {1:4, 5:9}
                                            5   {2:11, 3:1, 4:9, 6:6, 7:2}
                                            6   {5:6}
                                            7   {5:2}
2                   5           3
1               2
                        11
                                1
4           9           5

    4                               2
                6
                                            (1, 2, 2)
                                        7   (1, 4, 4)
                    6
                                            (2, 3, 5)
                                            (2, 5, 11)
                                            (3, 5, 1)
                                            (4, 5, 9)
                                            (5, 6, 6)
                                            (5, 7, 2)
Adjacency list  edge list
(weighted) directed network

          Input
       Adjacency list

         Output
         Edge list
Adjacency list  edge list
(weighted) directed network

           Map
    input: u {w1, …, wk}
    foreach wi:
       output (u, wi)

         Reduce
           pass
Edge list  adjacency list
(weighted) undirected network

           Input
          Edge list

          Output
        Adjacency list
Edge list  adjacency list
(weighted) undirected network

            Map
       input: (u, w)
   output: (u, w), key := u
   output: (w, u), key := w

          Reduce
     input: u, {w1, …, wk}
           identity
3
1       2


                5

    4


                              7
            6



                Degree of node u
                # of edges incident on u
Edge list  node degrees
   undirected network

         Input
        Edge list

        Output
      Node degrees
Edge list  node degrees
   undirected network

           Map
      input: (u, w)
  output: (u, w), key := u
  output: (w, u), key := w

         Reduce
   input: u, {w1, …, wk}
       output: u, k
Edge list  degree distribution
       undirected network

             Input
            Edge list

            Output
       Degree distribution
Edge list  degree distribution
       undirected network

              Map
         input: (u, w)
     output: (u, w), key := u
     output: (w, u), key := w

            Reduce
      input: u, {w1, …, wk}
          output: u, k
Edge list  degree distribution
       undirected network

              Map
           input: u, k
        identity, key := k

            Reduce
       input: k, {u1, …, um}
          output: k, m
3
1           2


                    5

    4


                               7
                6



                        Path
            Sequence of nodes with each
        consecutive pair connected by an edge
3
1                2


                         5

    4


                                      7
                     6



                             Cycle
        Path with at least three edges with first and last
          nodes the same and all other nodes distinct
Connected Graph
There is a path between every pair of nodes
Connected Graph
There is a path between every pair of nodes
Connected Component
 A connected subset of nodes that is not
contained in any larger connected subset
Distance
Length of the shortest path between two nodes
Distance
Length of the shortest path between two nodes
Breadth-first Search
iteratively explore nodes one layer at a time
# initialize distances
dist = {}
for u in G:
   dist[u] = NA

dist [u1] = 0

d=0
periphery = { u1 }
while len(periphery) > 0:
  # find nodes one step away from the periphery
  next_level = {}
  for u in periphery:
     next_level += { w for w in neighbors[u] if dist[w] == NA }

   # update distances
   d += 1
   for u in next_level:
     dist[u] = d

  # update periphery
  periphery = next_level
BFS @ scale
    undirected network

           Input
 edge list, starting node u0

          Output
Distance to all nodes from u0
BFS @ scale
        undirected network

Input: distances (u, d)
1. join distances with edge list
2. foreach (u, d, w) output (w, d+1)
  [ also output (u0, 0) ]
3. group by w, and output min d

Más contenido relacionado

La actualidad más candente

La actualidad más candente (14)

Order of operations practice puzzle
Order of operations practice puzzleOrder of operations practice puzzle
Order of operations practice puzzle
 
Inecuaciones - matematicas
Inecuaciones - matematicasInecuaciones - matematicas
Inecuaciones - matematicas
 
Datamining r 1st
Datamining r 1stDatamining r 1st
Datamining r 1st
 
Precalculus 6th edition blitzer test bank
Precalculus 6th edition blitzer test bankPrecalculus 6th edition blitzer test bank
Precalculus 6th edition blitzer test bank
 
Kelantan mtambahan + skema
Kelantan mtambahan + skemaKelantan mtambahan + skema
Kelantan mtambahan + skema
 
E1 f1 bộ binh
E1 f1 bộ binhE1 f1 bộ binh
E1 f1 bộ binh
 
E1 f7 bộ binh
E1 f7 bộ binhE1 f7 bộ binh
E1 f7 bộ binh
 
7-7 Equivalent Fractions
7-7 Equivalent Fractions7-7 Equivalent Fractions
7-7 Equivalent Fractions
 
College algebra 7th edition by blitzer solution manual
College algebra 7th edition by blitzer solution manualCollege algebra 7th edition by blitzer solution manual
College algebra 7th edition by blitzer solution manual
 
E1 f9 bộ binh
E1 f9 bộ binhE1 f9 bộ binh
E1 f9 bộ binh
 
PFDS 6.4.3
PFDS 6.4.3PFDS 6.4.3
PFDS 6.4.3
 
E2 f6 bộ binh
E2 f6 bộ binhE2 f6 bộ binh
E2 f6 bộ binh
 
E1 f6 bộ binh
E1 f6 bộ binhE1 f6 bộ binh
E1 f6 bộ binh
 
MATH: REV. QUIZ INEQUALITIES
MATH: REV. QUIZ INEQUALITIESMATH: REV. QUIZ INEQUALITIES
MATH: REV. QUIZ INEQUALITIES
 

Destacado

Computational Social Science, Lecture 10: Online Experiments
Computational Social Science, Lecture 10: Online ExperimentsComputational Social Science, Lecture 10: Online Experiments
Computational Social Science, Lecture 10: Online Experimentsjakehofman
 
Computational Social Science, Lecture 08: Counting Fast, Part II
Computational Social Science, Lecture 08: Counting Fast, Part IIComputational Social Science, Lecture 08: Counting Fast, Part II
Computational Social Science, Lecture 08: Counting Fast, Part IIjakehofman
 
Computational Social Science, Lecture 13: Classification
Computational Social Science, Lecture 13: ClassificationComputational Social Science, Lecture 13: Classification
Computational Social Science, Lecture 13: Classificationjakehofman
 
Computational Social Science, Lecture 11: Regression
Computational Social Science, Lecture 11: RegressionComputational Social Science, Lecture 11: Regression
Computational Social Science, Lecture 11: Regressionjakehofman
 
Computational Social Science, Lecture 07: Counting Fast, Part I
Computational Social Science, Lecture 07: Counting Fast, Part IComputational Social Science, Lecture 07: Counting Fast, Part I
Computational Social Science, Lecture 07: Counting Fast, Part Ijakehofman
 
Computational Social Science, Lecture 09: Data Wrangling
Computational Social Science, Lecture 09: Data WranglingComputational Social Science, Lecture 09: Data Wrangling
Computational Social Science, Lecture 09: Data Wranglingjakehofman
 
Computational Social Science, Lecture 06: Networks, Part II
Computational Social Science, Lecture 06: Networks, Part IIComputational Social Science, Lecture 06: Networks, Part II
Computational Social Science, Lecture 06: Networks, Part IIjakehofman
 
Computational Social Science, Lecture 03: Counting at Scale, Part I
Computational Social Science, Lecture 03: Counting at Scale, Part IComputational Social Science, Lecture 03: Counting at Scale, Part I
Computational Social Science, Lecture 03: Counting at Scale, Part Ijakehofman
 
Computational Social Science, Lecture 04: Counting at Scale, Part II
Computational Social Science, Lecture 04: Counting at Scale, Part IIComputational Social Science, Lecture 04: Counting at Scale, Part II
Computational Social Science, Lecture 04: Counting at Scale, Part IIjakehofman
 
Computational Social Science, Lecture 02: An Introduction to Counting
Computational Social Science, Lecture 02: An Introduction to CountingComputational Social Science, Lecture 02: An Introduction to Counting
Computational Social Science, Lecture 02: An Introduction to Countingjakehofman
 
Modeling Social Data, Lecture 6: Regression, Part 1
Modeling Social Data, Lecture 6: Regression, Part 1Modeling Social Data, Lecture 6: Regression, Part 1
Modeling Social Data, Lecture 6: Regression, Part 1jakehofman
 
Modeling Social Data, Lecture 2: Introduction to Counting
Modeling Social Data, Lecture 2: Introduction to CountingModeling Social Data, Lecture 2: Introduction to Counting
Modeling Social Data, Lecture 2: Introduction to Countingjakehofman
 
Modeling Social Data, Lecture 1: Overview
Modeling Social Data, Lecture 1: OverviewModeling Social Data, Lecture 1: Overview
Modeling Social Data, Lecture 1: Overviewjakehofman
 
Catastrophic Cancellation
Catastrophic CancellationCatastrophic Cancellation
Catastrophic CancellationC4Media
 
Matrices in computer applications
Matrices in computer applicationsMatrices in computer applications
Matrices in computer applicationsRayyan777
 
Profitable growth via adjacency - Guest lecture on Zook by Peter Spung
Profitable growth via adjacency - Guest lecture on Zook by Peter SpungProfitable growth via adjacency - Guest lecture on Zook by Peter Spung
Profitable growth via adjacency - Guest lecture on Zook by Peter SpungPeter Spung
 
Multiplication of matrices and its application in biology
Multiplication of matrices and its application in biologyMultiplication of matrices and its application in biology
Multiplication of matrices and its application in biologynayanika bhalla
 

Destacado (20)

Computational Social Science, Lecture 10: Online Experiments
Computational Social Science, Lecture 10: Online ExperimentsComputational Social Science, Lecture 10: Online Experiments
Computational Social Science, Lecture 10: Online Experiments
 
Computational Social Science, Lecture 08: Counting Fast, Part II
Computational Social Science, Lecture 08: Counting Fast, Part IIComputational Social Science, Lecture 08: Counting Fast, Part II
Computational Social Science, Lecture 08: Counting Fast, Part II
 
Computational Social Science, Lecture 13: Classification
Computational Social Science, Lecture 13: ClassificationComputational Social Science, Lecture 13: Classification
Computational Social Science, Lecture 13: Classification
 
Computational Social Science, Lecture 11: Regression
Computational Social Science, Lecture 11: RegressionComputational Social Science, Lecture 11: Regression
Computational Social Science, Lecture 11: Regression
 
Computational Social Science, Lecture 07: Counting Fast, Part I
Computational Social Science, Lecture 07: Counting Fast, Part IComputational Social Science, Lecture 07: Counting Fast, Part I
Computational Social Science, Lecture 07: Counting Fast, Part I
 
Computational Social Science, Lecture 09: Data Wrangling
Computational Social Science, Lecture 09: Data WranglingComputational Social Science, Lecture 09: Data Wrangling
Computational Social Science, Lecture 09: Data Wrangling
 
Computational Social Science, Lecture 06: Networks, Part II
Computational Social Science, Lecture 06: Networks, Part IIComputational Social Science, Lecture 06: Networks, Part II
Computational Social Science, Lecture 06: Networks, Part II
 
Computational Social Science, Lecture 03: Counting at Scale, Part I
Computational Social Science, Lecture 03: Counting at Scale, Part IComputational Social Science, Lecture 03: Counting at Scale, Part I
Computational Social Science, Lecture 03: Counting at Scale, Part I
 
Computational Social Science, Lecture 04: Counting at Scale, Part II
Computational Social Science, Lecture 04: Counting at Scale, Part IIComputational Social Science, Lecture 04: Counting at Scale, Part II
Computational Social Science, Lecture 04: Counting at Scale, Part II
 
Computational Social Science, Lecture 02: An Introduction to Counting
Computational Social Science, Lecture 02: An Introduction to CountingComputational Social Science, Lecture 02: An Introduction to Counting
Computational Social Science, Lecture 02: An Introduction to Counting
 
Modeling Social Data, Lecture 6: Regression, Part 1
Modeling Social Data, Lecture 6: Regression, Part 1Modeling Social Data, Lecture 6: Regression, Part 1
Modeling Social Data, Lecture 6: Regression, Part 1
 
Modeling Social Data, Lecture 2: Introduction to Counting
Modeling Social Data, Lecture 2: Introduction to CountingModeling Social Data, Lecture 2: Introduction to Counting
Modeling Social Data, Lecture 2: Introduction to Counting
 
Modeling Social Data, Lecture 1: Overview
Modeling Social Data, Lecture 1: OverviewModeling Social Data, Lecture 1: Overview
Modeling Social Data, Lecture 1: Overview
 
Design lesson not taught in schools
Design lesson not taught in schoolsDesign lesson not taught in schools
Design lesson not taught in schools
 
Catastrophic Cancellation
Catastrophic CancellationCatastrophic Cancellation
Catastrophic Cancellation
 
Matrices in computer applications
Matrices in computer applicationsMatrices in computer applications
Matrices in computer applications
 
Profitable growth via adjacency - Guest lecture on Zook by Peter Spung
Profitable growth via adjacency - Guest lecture on Zook by Peter SpungProfitable growth via adjacency - Guest lecture on Zook by Peter Spung
Profitable growth via adjacency - Guest lecture on Zook by Peter Spung
 
Multiplication of matrices and its application in biology
Multiplication of matrices and its application in biologyMultiplication of matrices and its application in biology
Multiplication of matrices and its application in biology
 
presentacion
presentacionpresentacion
presentacion
 
10trucosparainternet
10trucosparainternet10trucosparainternet
10trucosparainternet
 

Similar a Computational Social Science, Lecture 05: Networks, Part I

Powerpoint ประกอบการบรรยาย
Powerpoint ประกอบการบรรยายPowerpoint ประกอบการบรรยาย
Powerpoint ประกอบการบรรยายevaluation47
 
Chapter 11 16 solucionario larson
Chapter 11 16 solucionario larson  Chapter 11 16 solucionario larson
Chapter 11 16 solucionario larson Bruno Ignacio
 
Section 7 practice b
Section 7 practice bSection 7 practice b
Section 7 practice bjslloyd23
 
Sports festival 2010 Results
Sports festival 2010 ResultsSports festival 2010 Results
Sports festival 2010 Resultssajanshare
 
14 +3+practice+b+adv
14 +3+practice+b+adv14 +3+practice+b+adv
14 +3+practice+b+advNene Thomas
 
Equation of a Circle
Equation of a CircleEquation of a Circle
Equation of a CircleLily Maryati
 
Using flash type questions – stroke of luck or curse for data quality?
Using flash type questions – stroke of luck or curse for data quality?Using flash type questions – stroke of luck or curse for data quality?
Using flash type questions – stroke of luck or curse for data quality?QuestBack AG
 
Calculo y geometria analitica (larson hostetler-edwards) 8th ed - solutions m...
Calculo y geometria analitica (larson hostetler-edwards) 8th ed - solutions m...Calculo y geometria analitica (larson hostetler-edwards) 8th ed - solutions m...
Calculo y geometria analitica (larson hostetler-edwards) 8th ed - solutions m...ELMIR IVAN OZUNA LOPEZ
 
Day 1 intro to functions
Day 1 intro to functionsDay 1 intro to functions
Day 1 intro to functionsErik Tjersland
 
Indian Wine Market Report - 2011
Indian Wine Market Report - 2011Indian Wine Market Report - 2011
Indian Wine Market Report - 2011david_singer
 
NCV 2 Mathematical Literacy Hands-On Training Activities Module 4
NCV 2 Mathematical Literacy Hands-On Training Activities Module 4NCV 2 Mathematical Literacy Hands-On Training Activities Module 4
NCV 2 Mathematical Literacy Hands-On Training Activities Module 4Future Managers
 
How to create an effective presentation
How to create an effective presentationHow to create an effective presentation
How to create an effective presentationJames Casella
 
Visualizing Dynamic Metrics with Profiling Blueprints
Visualizing Dynamic Metrics with Profiling BlueprintsVisualizing Dynamic Metrics with Profiling Blueprints
Visualizing Dynamic Metrics with Profiling BlueprintsESUG
 
IxDC2011 中国交互设计体验日a5_用讲故事的方法来做手机产品交互设计_百度_陈莹_史玉洁
IxDC2011 中国交互设计体验日a5_用讲故事的方法来做手机产品交互设计_百度_陈莹_史玉洁IxDC2011 中国交互设计体验日a5_用讲故事的方法来做手机产品交互设计_百度_陈莹_史玉洁
IxDC2011 中国交互设计体验日a5_用讲故事的方法来做手机产品交互设计_百度_陈莹_史玉洁IxDC
 

Similar a Computational Social Science, Lecture 05: Networks, Part I (20)

Powerpoint ประกอบการบรรยาย
Powerpoint ประกอบการบรรยายPowerpoint ประกอบการบรรยาย
Powerpoint ประกอบการบรรยาย
 
1.3.4
1.3.41.3.4
1.3.4
 
Chapter 11 16 solucionario larson
Chapter 11 16 solucionario larson  Chapter 11 16 solucionario larson
Chapter 11 16 solucionario larson
 
Section 7 practice b
Section 7 practice bSection 7 practice b
Section 7 practice b
 
1.2.4
1.2.41.2.4
1.2.4
 
Sports festival 2010 Results
Sports festival 2010 ResultsSports festival 2010 Results
Sports festival 2010 Results
 
14 +3+practice+b+adv
14 +3+practice+b+adv14 +3+practice+b+adv
14 +3+practice+b+adv
 
Equation of a Circle
Equation of a CircleEquation of a Circle
Equation of a Circle
 
Using flash type questions – stroke of luck or curse for data quality?
Using flash type questions – stroke of luck or curse for data quality?Using flash type questions – stroke of luck or curse for data quality?
Using flash type questions – stroke of luck or curse for data quality?
 
Calculo y geometria analitica (larson hostetler-edwards) 8th ed - solutions m...
Calculo y geometria analitica (larson hostetler-edwards) 8th ed - solutions m...Calculo y geometria analitica (larson hostetler-edwards) 8th ed - solutions m...
Calculo y geometria analitica (larson hostetler-edwards) 8th ed - solutions m...
 
Day 1 intro to functions
Day 1 intro to functionsDay 1 intro to functions
Day 1 intro to functions
 
Pre algebra lesson 8-7
Pre algebra lesson 8-7Pre algebra lesson 8-7
Pre algebra lesson 8-7
 
Indian Wine Market Report - 2011
Indian Wine Market Report - 2011Indian Wine Market Report - 2011
Indian Wine Market Report - 2011
 
1.2.3
1.2.31.2.3
1.2.3
 
NCV 2 Mathematical Literacy Hands-On Training Activities Module 4
NCV 2 Mathematical Literacy Hands-On Training Activities Module 4NCV 2 Mathematical Literacy Hands-On Training Activities Module 4
NCV 2 Mathematical Literacy Hands-On Training Activities Module 4
 
How to create an effective presentation
How to create an effective presentationHow to create an effective presentation
How to create an effective presentation
 
Visualizing Dynamic Metrics with Profiling Blueprints
Visualizing Dynamic Metrics with Profiling BlueprintsVisualizing Dynamic Metrics with Profiling Blueprints
Visualizing Dynamic Metrics with Profiling Blueprints
 
IxDC2011 中国交互设计体验日a5_用讲故事的方法来做手机产品交互设计_百度_陈莹_史玉洁
IxDC2011 中国交互设计体验日a5_用讲故事的方法来做手机产品交互设计_百度_陈莹_史玉洁IxDC2011 中国交互设计体验日a5_用讲故事的方法来做手机产品交互设计_百度_陈莹_史玉洁
IxDC2011 中国交互设计体验日a5_用讲故事的方法来做手机产品交互设计_百度_陈莹_史玉洁
 
Dmxchart
DmxchartDmxchart
Dmxchart
 
Fact Families
Fact FamiliesFact Families
Fact Families
 

Más de jakehofman

Modeling Social Data, Lecture 12: Causality & Experiments, Part 2
Modeling Social Data, Lecture 12: Causality & Experiments, Part 2Modeling Social Data, Lecture 12: Causality & Experiments, Part 2
Modeling Social Data, Lecture 12: Causality & Experiments, Part 2jakehofman
 
Modeling Social Data, Lecture 11: Causality and Experiments, Part 1
Modeling Social Data, Lecture 11: Causality and Experiments, Part 1Modeling Social Data, Lecture 11: Causality and Experiments, Part 1
Modeling Social Data, Lecture 11: Causality and Experiments, Part 1jakehofman
 
Modeling Social Data, Lecture 10: Networks
Modeling Social Data, Lecture 10: NetworksModeling Social Data, Lecture 10: Networks
Modeling Social Data, Lecture 10: Networksjakehofman
 
Modeling Social Data, Lecture 8: Classification
Modeling Social Data, Lecture 8: ClassificationModeling Social Data, Lecture 8: Classification
Modeling Social Data, Lecture 8: Classificationjakehofman
 
Modeling Social Data, Lecture 7: Model complexity and generalization
Modeling Social Data, Lecture 7: Model complexity and generalizationModeling Social Data, Lecture 7: Model complexity and generalization
Modeling Social Data, Lecture 7: Model complexity and generalizationjakehofman
 
Modeling Social Data, Lecture 4: Counting at Scale
Modeling Social Data, Lecture 4: Counting at ScaleModeling Social Data, Lecture 4: Counting at Scale
Modeling Social Data, Lecture 4: Counting at Scalejakehofman
 
Modeling Social Data, Lecture 3: Data manipulation in R
Modeling Social Data, Lecture 3: Data manipulation in RModeling Social Data, Lecture 3: Data manipulation in R
Modeling Social Data, Lecture 3: Data manipulation in Rjakehofman
 
Modeling Social Data, Lecture 8: Recommendation Systems
Modeling Social Data, Lecture 8: Recommendation SystemsModeling Social Data, Lecture 8: Recommendation Systems
Modeling Social Data, Lecture 8: Recommendation Systemsjakehofman
 
Modeling Social Data, Lecture 6: Classification with Naive Bayes
Modeling Social Data, Lecture 6: Classification with Naive BayesModeling Social Data, Lecture 6: Classification with Naive Bayes
Modeling Social Data, Lecture 6: Classification with Naive Bayesjakehofman
 
Modeling Social Data, Lecture 3: Counting at Scale
Modeling Social Data, Lecture 3: Counting at ScaleModeling Social Data, Lecture 3: Counting at Scale
Modeling Social Data, Lecture 3: Counting at Scalejakehofman
 
Modeling Social Data, Lecture 2: Introduction to Counting
Modeling Social Data, Lecture 2: Introduction to CountingModeling Social Data, Lecture 2: Introduction to Counting
Modeling Social Data, Lecture 2: Introduction to Countingjakehofman
 
Modeling Social Data, Lecture 1: Case Studies
Modeling Social Data, Lecture 1: Case StudiesModeling Social Data, Lecture 1: Case Studies
Modeling Social Data, Lecture 1: Case Studiesjakehofman
 
NYC Data Science Meetup: Computational Social Science
NYC Data Science Meetup: Computational Social ScienceNYC Data Science Meetup: Computational Social Science
NYC Data Science Meetup: Computational Social Sciencejakehofman
 
Technical Tricks of Vowpal Wabbit
Technical Tricks of Vowpal WabbitTechnical Tricks of Vowpal Wabbit
Technical Tricks of Vowpal Wabbitjakehofman
 
Data-driven modeling: Lecture 10
Data-driven modeling: Lecture 10Data-driven modeling: Lecture 10
Data-driven modeling: Lecture 10jakehofman
 
Data-driven modeling: Lecture 09
Data-driven modeling: Lecture 09Data-driven modeling: Lecture 09
Data-driven modeling: Lecture 09jakehofman
 
Using Data to Understand the Brain
Using Data to Understand the BrainUsing Data to Understand the Brain
Using Data to Understand the Brainjakehofman
 

Más de jakehofman (17)

Modeling Social Data, Lecture 12: Causality & Experiments, Part 2
Modeling Social Data, Lecture 12: Causality & Experiments, Part 2Modeling Social Data, Lecture 12: Causality & Experiments, Part 2
Modeling Social Data, Lecture 12: Causality & Experiments, Part 2
 
Modeling Social Data, Lecture 11: Causality and Experiments, Part 1
Modeling Social Data, Lecture 11: Causality and Experiments, Part 1Modeling Social Data, Lecture 11: Causality and Experiments, Part 1
Modeling Social Data, Lecture 11: Causality and Experiments, Part 1
 
Modeling Social Data, Lecture 10: Networks
Modeling Social Data, Lecture 10: NetworksModeling Social Data, Lecture 10: Networks
Modeling Social Data, Lecture 10: Networks
 
Modeling Social Data, Lecture 8: Classification
Modeling Social Data, Lecture 8: ClassificationModeling Social Data, Lecture 8: Classification
Modeling Social Data, Lecture 8: Classification
 
Modeling Social Data, Lecture 7: Model complexity and generalization
Modeling Social Data, Lecture 7: Model complexity and generalizationModeling Social Data, Lecture 7: Model complexity and generalization
Modeling Social Data, Lecture 7: Model complexity and generalization
 
Modeling Social Data, Lecture 4: Counting at Scale
Modeling Social Data, Lecture 4: Counting at ScaleModeling Social Data, Lecture 4: Counting at Scale
Modeling Social Data, Lecture 4: Counting at Scale
 
Modeling Social Data, Lecture 3: Data manipulation in R
Modeling Social Data, Lecture 3: Data manipulation in RModeling Social Data, Lecture 3: Data manipulation in R
Modeling Social Data, Lecture 3: Data manipulation in R
 
Modeling Social Data, Lecture 8: Recommendation Systems
Modeling Social Data, Lecture 8: Recommendation SystemsModeling Social Data, Lecture 8: Recommendation Systems
Modeling Social Data, Lecture 8: Recommendation Systems
 
Modeling Social Data, Lecture 6: Classification with Naive Bayes
Modeling Social Data, Lecture 6: Classification with Naive BayesModeling Social Data, Lecture 6: Classification with Naive Bayes
Modeling Social Data, Lecture 6: Classification with Naive Bayes
 
Modeling Social Data, Lecture 3: Counting at Scale
Modeling Social Data, Lecture 3: Counting at ScaleModeling Social Data, Lecture 3: Counting at Scale
Modeling Social Data, Lecture 3: Counting at Scale
 
Modeling Social Data, Lecture 2: Introduction to Counting
Modeling Social Data, Lecture 2: Introduction to CountingModeling Social Data, Lecture 2: Introduction to Counting
Modeling Social Data, Lecture 2: Introduction to Counting
 
Modeling Social Data, Lecture 1: Case Studies
Modeling Social Data, Lecture 1: Case StudiesModeling Social Data, Lecture 1: Case Studies
Modeling Social Data, Lecture 1: Case Studies
 
NYC Data Science Meetup: Computational Social Science
NYC Data Science Meetup: Computational Social ScienceNYC Data Science Meetup: Computational Social Science
NYC Data Science Meetup: Computational Social Science
 
Technical Tricks of Vowpal Wabbit
Technical Tricks of Vowpal WabbitTechnical Tricks of Vowpal Wabbit
Technical Tricks of Vowpal Wabbit
 
Data-driven modeling: Lecture 10
Data-driven modeling: Lecture 10Data-driven modeling: Lecture 10
Data-driven modeling: Lecture 10
 
Data-driven modeling: Lecture 09
Data-driven modeling: Lecture 09Data-driven modeling: Lecture 09
Data-driven modeling: Lecture 09
 
Using Data to Understand the Brain
Using Data to Understand the BrainUsing Data to Understand the Brain
Using Data to Understand the Brain
 

Último

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 

Último (20)

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 

Computational Social Science, Lecture 05: Networks, Part I

  • 1. Networks Part I Sharad Goel Columbia University Computational Social Science: Lecture 5 February 22, 2013
  • 2. High School Dating Network [ Bearman, Moody, & Stovel, 2004 ] Image by Mark Newman, via Easley & Kleinberg
  • 3. Corporate E-mail Communication [ Adamic & Adar, 2004 ] via Easley & Kleinberg
  • 4. “Internet map 2004” from Math Insight http://mathinsight.org/image/internet_map_jurvetson_2004
  • 5. Networks/Graphs Nodes/vertices people, organizations, webpages, computers Edges represent connections between pairs of nodes
  • 6.
  • 7.
  • 8.
  • 9. 2 5 11 1 4 9 6 2
  • 10. 1 2 4 6 4 2 1 2 3 7 13
  • 11. 3 1 2 5 4 1 2 3 4 5 6 7 7 1 0 1 0 1 0 0 0 6 2 1 0 1 0 1 0 0 3 0 1 0 0 1 0 0 4 1 0 0 0 1 0 0 5 0 1 1 1 0 1 1 6 0 0 0 0 1 0 0 7 0 0 0 0 1 0 0
  • 12. 3 1 2 5 4 7 1 {2, 4} 6 2 {1, 3, 5} 3 {2, 5} 4 {1, 5} 5 {2, 3, 4, 6, 7} 6 {5} 7 {5}
  • 13. 3 1 2 5 4 (1, 2) 7 (1, 4) 6 (2, 3) (2, 5) (3, 5) (4, 5) (5, 6) (5, 7)
  • 14. 2 5 3 1 2 11 1 4 9 5 4 2 6 7 6 1 {2:2, 4:4} 2 {1:2, 3:5, 5:11} 3 {2:5, 5:1} 4 {1:4, 5:9} 5 {2:11, 3:1, 4:9, 6:6, 7:2} 6 {5:6} 7 {5:2}
  • 15. 2 5 3 1 2 11 1 4 9 5 4 2 6 (1, 2, 2) 7 (1, 4, 4) 6 (2, 3, 5) (2, 5, 11) (3, 5, 1) (4, 5, 9) (5, 6, 6) (5, 7, 2)
  • 16. Adjacency list  edge list (weighted) directed network Input Adjacency list Output Edge list
  • 17. Adjacency list  edge list (weighted) directed network Map input: u {w1, …, wk} foreach wi: output (u, wi) Reduce pass
  • 18. Edge list  adjacency list (weighted) undirected network Input Edge list Output Adjacency list
  • 19. Edge list  adjacency list (weighted) undirected network Map input: (u, w) output: (u, w), key := u output: (w, u), key := w Reduce input: u, {w1, …, wk} identity
  • 20. 3 1 2 5 4 7 6 Degree of node u # of edges incident on u
  • 21. Edge list  node degrees undirected network Input Edge list Output Node degrees
  • 22. Edge list  node degrees undirected network Map input: (u, w) output: (u, w), key := u output: (w, u), key := w Reduce input: u, {w1, …, wk} output: u, k
  • 23. Edge list  degree distribution undirected network Input Edge list Output Degree distribution
  • 24. Edge list  degree distribution undirected network Map input: (u, w) output: (u, w), key := u output: (w, u), key := w Reduce input: u, {w1, …, wk} output: u, k
  • 25. Edge list  degree distribution undirected network Map input: u, k identity, key := k Reduce input: k, {u1, …, um} output: k, m
  • 26. 3 1 2 5 4 7 6 Path Sequence of nodes with each consecutive pair connected by an edge
  • 27. 3 1 2 5 4 7 6 Cycle Path with at least three edges with first and last nodes the same and all other nodes distinct
  • 28. Connected Graph There is a path between every pair of nodes
  • 29. Connected Graph There is a path between every pair of nodes
  • 30. Connected Component A connected subset of nodes that is not contained in any larger connected subset
  • 31. Distance Length of the shortest path between two nodes
  • 32. Distance Length of the shortest path between two nodes
  • 33. Breadth-first Search iteratively explore nodes one layer at a time
  • 34. # initialize distances dist = {} for u in G: dist[u] = NA dist [u1] = 0 d=0 periphery = { u1 } while len(periphery) > 0: # find nodes one step away from the periphery next_level = {} for u in periphery: next_level += { w for w in neighbors[u] if dist[w] == NA } # update distances d += 1 for u in next_level: dist[u] = d # update periphery periphery = next_level
  • 35. BFS @ scale undirected network Input edge list, starting node u0 Output Distance to all nodes from u0
  • 36. BFS @ scale undirected network Input: distances (u, d) 1. join distances with edge list 2. foreach (u, d, w) output (w, d+1) [ also output (u0, 0) ] 3. group by w, and output min d