Networks_Analysis
Part A- investigate two different social networks
-
build_graph - The function inputs a string – the name of the data set, e.g., "PartB-C.csv" and returns a networx.Graph object will represent the nodes, the edges, and weights (when they exist) as they are at the data set.
-
plot_degree_histogram The function inputs a dictionary representation of the degree histogram object and plots it.
-
clustering_coefficient The function inputs a graph and returns the clustering coefficient
PART B - Diffusion models
MODEL 1- Linear threshold model (deterministic, without using Lethality and R)
MODEL 2 - Independent cascade model (stochastic)
PART C - choose_who_to_vaccinate
The following heuristic for Part C is simply taking the top 50 friendly people; that is, it returns the top 50 nodes in the graph with the highest degree