SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances (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
 

En vedette

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
 

En vedette (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
 

Similaire à Network Analysis Concepts and Algorithms

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
 

Similaire à Network Analysis Concepts and Algorithms (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
 

Plus 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
 

Plus 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
 

Dernier

Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 

Dernier (20)

Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 

Network Analysis Concepts and Algorithms

  • 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