0% found this document useful (0 votes)
27 views36 pages

ECON 708 2023 - Intro Redes

The document discusses networks and their analysis using tools from network science. It begins with an introduction to networks, providing examples of different real-world networks like power grids, the World Wide Web, transportation networks, and social networks. It then discusses some key network concepts and metrics that are important for network analysis. Specifically, it discusses the Königsberg bridge problem, which helped establish the field of graph theory and network science. It also provides examples of how network structure can impact dynamics on networks, like cascading failures in power grids. Finally, it discusses different ways networks can be represented mathematically, including adjacency matrices and adjacency lists, and defines some basic network metrics like node degree.

Uploaded by

Jan Garcia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views36 pages

ECON 708 2023 - Intro Redes

The document discusses networks and their analysis using tools from network science. It begins with an introduction to networks, providing examples of different real-world networks like power grids, the World Wide Web, transportation networks, and social networks. It then discusses some key network concepts and metrics that are important for network analysis. Specifically, it discusses the Königsberg bridge problem, which helped establish the field of graph theory and network science. It also provides examples of how network structure can impact dynamics on networks, like cascading failures in power grids. Finally, it discusses different ways networks can be represented mathematically, including adjacency matrices and adjacency lists, and defines some basic network metrics like node degree.

Uploaded by

Jan Garcia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 36

ECON-708

Economía y Procesamiento de Datos No Tradicionales


Clases 09 y 10
Aplicaciones I: Introducció n a Redes

Viktoriya Semeshenko
Sergio De Raco

ECON 708 - 2023-C1 - FCE-UBA


https://bit.ly/econ708-2023c1-clase09
Aplicaciones I: Introducció n a Redes

ECON 708 - 2023-C1 - FCE-UBA


https://bit.ly/econ708-2023c1-clase09
Outline
● Introducció n general a Redes
○ Conceptos, definiciones, tipos, principales métricas (Parte I)
○ Clasificació n de redes y métricas de centralidad (Parte II)
● Redes en R con igraph

ECON 708 - 2023-C1 - FCE-UBA 3


https://bit.ly/econ708-2023c1-clase09
¿qué son redes?

• Redes eléctricas
• World Wide Web
• Redes de Transporte
• Redes de aeropuerto
• Redes Sociales
• Redes Financieras
• Redes neuronales …

Fuente: Architecture of the Florida power grid as a complex network


ECON 708 - 2023-C1 - FCE-UBA 4
https://bit.ly/econ708-2023c1-clase09
Story 1: Power Grid Network
● At first glance, images (a) and (b) are indistinguishable, showing lights shining in highly populated areas and dark
spaces marking vast forests and uninhabited oceans.
● On closer inspection, we notice differences: Toronto, Detroit, Cleveland, Columbus, and Long Island, bright in (a), have
darkened in (b).
● Actual image of the northeastern US on August 14, 2003, before and after the blackout that left approximately 45
million people in eight US states, and another 10 million in Ontario without power. The 2003 blackout is a typical
example of a cascading failure. Vulnerability due to interconnectivity

Source: Network Science. AL Barabási


ECON 708 - 2023-C1 - FCE-UBA 5
https://bit.ly/econ708-2023c1-clase09
Vulnerability due to interconnectivity: avalanches
• When a network acts as a transportation system, a local failure spreads loads to other nodes.
If the additional load is negligible, the system can absorb it without problems, and the failure
goes unnoticed. However, if the additional load is too much for neighboring nodes, they will
also fail and redistribute the load to their neighbors.
• We are faced with a cascading event, the magnitude of which depends on the position and
capacity of the nodes that initially failed.
• The Northeast blackout example illustrates several important issues:
– to avoid damage from cascades, we need to understand the structure of the network in which the cascade
propagates
– we need to model the dynamic processes that take place in these networks, such as the flow of electricity
– we need to find out how the interaction between network structure and dynamics affects the robustness of the
whole system. Although cascade failures may seem random and unpredictable, they follow reproducible laws that
can be quantified and even be predicted using network science tools

ECON 708 - 2023-C1 - FCE-UBA 6


https://bit.ly/econ708-2023c1-clase09
¿qué son redes?

• Redes eléctricas
• World Wide Web
• Redes de Transporte
• Redes de aeropuerto
• Redes sociales
• Redes Financieras
• Redes neuronales …

ECON 708 - 2023-C1 - FCE-UBA 7


https://bit.ly/econ708-2023c1-clase09
¿qué son redes?

• Redes eléctricas
• World Wide Web
• Redes de Transporte
• Redes de aeropuerto
• Redes sociales
• Redes Financiers
• Redes neuronales …

Source:
A Graph-based approach to community detection in Twitter N
etworks
ECON 708 - 2023-C1 - FCE-UBA 8
https://bit.ly/econ708-2023c1-clase09
Story 2: A Twitter Ego-Network
Source:
A Graph-based approach to community detection in Twitter N
etworks
1. Data Mining (API)
2. Building the network
a. 1-step Neighbourhood
3. Community detection
a. Find communities based on ‘information
flow’ — Infomap
b. “Users” within interconnected clusters
tend to share similar characteristics –
Homophily
c. Classifying Twitter Topic-Networks Using
Social Network Analysis

ECON 708 - 2023-C1 - FCE-UBA 9


https://bit.ly/econ708-2023c1-clase09
¿Qué es una red ?
• Estructura matemá tica que consta de “nodos” (o vértices) y “aristas” (o enlaces)
que hacen conexió n entre nodos

Completa Bipartita Aleatoria Regular …


(Grilla)
ECON 708 - 2023-C1 - FCE-UBA 10
https://bit.ly/econ708-2023c1-clase09
Los puentes de Kö nigsberg
• La teoría de grafos está detrá s de la ciencia de las redes. Sus raíces se remontan a 1735 en
Kö nigsberg, la capital de Prusia Oriental, una ciudad comercial pró spera de su tiempo. El comercio
apoyado por su ocupada flota de barcos permitió a los funcionarios de la ciudad construir siete
puentes a través del río Pregel que rodeaba la ciudad. Cinco de ellos conectaron con el continente
la elegante isla Kneiphof, atrapada entre las dos ramas del Pregel. Los dos restantes cruzaron las
dos ramas del río. Este peculiar arreglo dio origen a un rompecabezas contemporá neo:

¿se puede cruzar los siete puentes y nunca cruzar el mismo dos veces?

A pesar de muchos intentos, nadie pudo encontrar ese camino. El problema no se resolvió hasta
1735, cuando Leonard Euler, un matemá tico nacido en Suiza, ofreció una prueba matemá tica
rigurosa de que tal camino no existe.

ECON 708 - 2023-C1 - FCE-UBA 11


https://bit.ly/econ708-2023c1-clase09
Los puentes de Kö nigsberg

ECON 708 - 2023-C1 - FCE-UBA 12


https://bit.ly/econ708-2023c1-clase09
Grafo = Red
• G(V, E) : grafo ( red)
• V: vertices (nodos), E: edges (lazos)
• Nodos = 1, 2, 3, 4, 5
• Links =
– 1<->2, 1<->3, 1<->5
– 2<->3, 2<->4, 2<->5
– 3<->4, 3<->5, 4<->5

• Los nodos pueden tener estados


• Los lazos pueden tener direcciones y pesos

ECON 708 - 2023-C1 - FCE-UBA 13


https://bit.ly/econ708-2023c1-clase09
Redes unipartitas Analogía
Abstracción
Computadoras /
Internet

Actores co-
actuació n

Proteínas

Grafo
(misma red…)
ECON 708 - 2023-C1 - FCE-UBA 14
https://bit.ly/econ708-2023c1-clase09
Redes bipartitas

ECON 708 - 2023-C1 - FCE-UBA 15


https://bit.ly/econ708-2023c1-clase09
Representació n de la Red

● Matriz de adyacencia
○ Una matriz con filas y columnas donde cada elemento aij toma valor 1 cuando haya una arista que
une los vértices i y j. En caso contrario el elemento aij toma valor 0.

○ La matriz de adyacencia, por tanto, estará formada por ceros y unos.

● Lista de adyacencia
○ Una lista de links cuyo elemento “i→j” muestra un link que va del nodo i al nodo j.

○ También representado como “i→{j1,j2,j3,...}”

ECON 708 - 2023-C1 - FCE-UBA 16


https://bit.ly/econ708-2023c1-clase09
Grado de la red
• El grado ki del nodo i se puede obtener directamente de los elementos de la matriz de
adyacencia:
– No dirigida: es la suma sobre las filas o las columnas de la matriz (simétrica)

– Dirigida: las sumas sobre las filas y columnas de la matriz de adyacencia


proporcionan los grados entrantes y salientes, respectivamente

17
Generalidades para visualizar redes
• Atributos de nodos y links:
– Tamañ o, forma, color de nodos y grupos
– Grosor de links
• Layout de la red

18
Redes: Densidad, Sparsity
El número máximo de enlaces está limitado por el número posible de conexiones distintas entre los nodos del
sistema
– si todos los pares posibles de nodos están conectados por enlaces → red completa

• No dirigida: el número de pares distintos de nodos

• Dirigida: cada par de nodos cuenta, uno para cada dirección


• Densidad

– No dirigida:

– Dirigida:

Una característica para la estructura de la red → Sparsity


Redes: Densidad, Sparsity
• Red Completa , L=Lmax, so d=1
• Red Esparsa, L≪ Lmax, so d≪ 1
• La red es escasa si el número de enlaces crece proporcionalmente al número de
nodos (L∼ N), o incluso más lento
• Si el número de enlaces crece más rápido, ej. (L ∼N2), entonces decimos que la
red es densa

20
Redes: algunos detalles

21
Grado Promedio
• ki es el grado del nodo ith: representa el número de enlaces a otros nodos

• No dirigida:
– el número total de enlaces, L,
– Grado Promedio

• Dirigida: distinguimos entre grado entrante, k iin, el número de enlaces que apuntan al nodo i, y grado saliente, kiout, el
número de enlaces que apuntan desde el nodo i a otros nodos. E l grado total

– número total de enlaces

– El Grado Promedio

22
Redes: grados y fuerzas

Fuente. Barabási
23
Distribució n de Grado

24
Caminos y Distancias
• En redes la distancia es un concepto desafiante. ¿Cuá l es la distancia entre dos
pá ginas web o entre dos personas que no se conocen? La distancia física no es
relevante aquí.
• La distancia física es reemplazada por la longitud del camino (path length). La
longitud es un camino que recorre los enlaces de la red. La longitud de un
camino representa el nú mero de enlaces que contiene el camino

25
Caminos y Distancias

26
Camino má s corto (Shortest Path)

27
Elementos
• Camino
– Una secuencia de nodos de modo que cada nodo esté conectado al siguiente nodo a
lo largo del camino mediante un enlace. Cada ruta consta de n + 1 nodos y n enlaces.
La longitud de un camino es el nú mero de sus enlaces, contando mú ltiples enlaces
varias veces. (Ej: 1 → 2 → 5 → 4 → 3 covers a path of length four)
• Camino corto
– El camino con la distancia má s corta entre dos nodos (puede ser no ú nico).
– Ej: between nodes 1 and 4 we have two shortest paths, 1→ 2→ 3→ 4 (blue) and 1→ 2→ 5→ 4
(orange), having the same length d1,4 =3.
• Diá metro
– El camino má s corto má ximo (the longest shortest path) en un grá fico, o la distancia
entre los dos nodos má s lejanos
– Ej: the diameter is between nodes 1 and 4, hence dmax=3.
• Average path length 〈d〉
– The average of the shortest paths between all pairs of nodes.
(Ej: 〈d〉=1.6)
28
Average Path Length

29
Clustering Coefficient

30
Clustering

• Cluster = grupo

31
Clustering coefficient

32
Coeficiente de agrupamiento global

33
Redes en R con igraph
- Tutorial Kateto (https://kateto.net/network-visualization, có digo en github)
- Statistical Analysis of Network Data with R (SAND, libro en libgen 2ed
(intro+cap2))

Biblio de referencia: Barabá si: Network Science book

ECON 708 - 2023-C1 - FCE-UBA 34


https://bit.ly/econ708-2023c1-clase09
Referencia igraph y otros
● Manual de referencia R
● Cheat sheet
● R tidyverse related packages
○ ggraph
○ tidygraph

ECON 708 - 2023-C1 - FCE-UBA 35


https://bit.ly/econ708-2023c1-clase09
ECON 708 - 2023-C1 - FCE-UBA 36
https://bit.ly/econ708-2023c1-clase09

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy