# Python代写 | COMP 596: Network Science

COMP 596: Network Science

1. Choose 3 of the datasets in the Barbasi book, compute and plot [65%]: consider simple graphs, i.e.
remove self-loops, multi-edges, and directions (make them symmetric).
(a) the degree distribution (fit a line and find the slope),
numpyp.loadtxt(), scipy.sparse.csc matrix(), binning and log log scale, numpy.polyfit()
(b) clustering coefficient distribution (compute the average as well),
if not computationally feasible for some of the graphs, don’t report for that specific graph and
specify the reason; same is true for other parts
(c) shortest paths distribution (compute the average as well),
you can use scipy.sparse.csgraph functions, as well as sampling only fraction of nodes to estimate
the dist of all pair shortest paths for larger graphs, or drop them similar to above
(d) number of connected components, the portion of nodes that are in the GCC (giant/largest
connected component)
useful functions: csgraph.connected components()
(e) eigenvalue distribution (compute the spectral gap),
useful functions: sparse.linalg.eigs()
(f) degree correlations (plot as scatter di vs dj
, also report the overall correlation).
plot degree of source vs degree of destination, axes would be 0 to max degree in the graph and
you have a point in the scatter plot if the corresponding degree values are connected by any
edge use counting, binning or plot edges with low intensity to capture regions with high density
(g) degree-clustering coefficient relation (plot as scatter di vs ci)
scatter plot with axes being local cc and degree. Plot each node to show how degree correlates
with the cc of nodes. Similar to the plot above, capture nodes plotted over each other

E-mail: [email protected]  微信:itcsdx