Connectivity

Case Studies: Network Analysis in R

Edmund Hart

Instructor

Measuring connectivity

rand_g <- erdos.renyi.game(10, 0.4, "gnp", directed = FALSE)
plot(rand_g)

Case Studies: Network Analysis in R

Measuring connectivity

rand_g <- erdos.renyi.game(10, 0.4, "gnp", directed = FALSE)

vertex_connectivity(rand_g)
2
edge_connectivity(rand_g)
2
Case Studies: Network Analysis in R

Minimum number of cuts

min_cut(rand_g, value.only = FALSE)
$value
[1] 2

$cut
+ 2/18 edges from 17a8fad:
[1] 10--7 10--1

$partition1
+ 1/10 vertex, from 17a8fad:
[1] 10

$partition2
+ 9/10 vertices, from 17a8fad:
[1]  1 2 3  4  5  6  7  8  9
Case Studies: Network Analysis in R

Connectivity randomizations

# Get parameters to simulate graph
nv <- gorder(trip_g_ud)
ed <- edge_density(trip_g_ud)

# Empty vector to store output
graph_vec <- rep(NA, 1000)

# Generate 1000 random graphs and find the edge connectivity for(i in 1:1000) { w1 <- erdos.renyi.game(nv, ed, "gnp", directed = TRUE) graph_vec[i] <- edge_connectivity(w1) }
Case Studies: Network Analysis in R

Connectivity randomizations

# Find actual connectivity
econn <- edge_connectivity(trip_g_ud)
hist(graph_vec, xlim = c(0, 140))
abline(v = edge_connectivity(trip_g_ud))

histogram-connectivity-randomizations3.png

Case Studies: Network Analysis in R

Let's practice!

Case Studies: Network Analysis in R

Preparing Video For Download...