网络科学代写 | CS 7280: Network Science Assignment-2

这个作业是将网络转成无向网络并找到网络中最大的强连接组件
CS 7280: Network Science
Assignment-2

Part-1
Repeat the following steps once for out-degrees and once for in-degrees.
1. Plot the degree distribution in the four possible ways shown in Figure 4.22 of
your textbook (separately for out-degree and in-degree).
2. Because of the presence of “low-degree saturation” and “structural
limit” in real networks, the power-law distribution is usually fit excluding
values that are smaller or larger than a certain threshold. Use the “Fit”
function from “powerlaw” to estimate the exponent of the power-law
degree distribution and the minimum-x value for the power-law fit. Do the
estimation twice: once without setting the x_max threshold value, and once
setting x_max to remove the maximum outlier value (we recommend you set
x_max = 200 for the out-degree distribution and x_max = 300 for the indegree distribution respectively). We recommend you ignore nodes with zero
degree (otherwise the function “Fit” will “complain” giving you several
warnings).
Part-2
1. Convert the previous network (from Part-1) into an undirected network.
Calculate the Pearson correlation coefficient for the degrees of adjacent
nodes. Based on this analysis, is this network assortative, disassortative,
or neutral? Make sure that your answer is justified and that you evaluate the
statistical significance of your conclusion using the t-test.
2. Plot the average neighbor degree (averaged across all nodes of
degree k) as a function of the node degree k. Based on this analysis, is
this network assortative, disassortative, or neutral? Make sure that your
answer is justified and that you evaluate the statistical significance of your
conclusion using the t-test.
Part-3
1. Find the largest strongly connected component of the network in Part-1,
and convert it to an undirected network. Let us call this undirected network
G0. Create G(n,p) random networks with the same number of nodes and the
same number of expected edges as G0. Then, compare the diameter of G0
with the diameter of 100 such G(n,p) networks (with a plot that shows the
distribution of those 100 values – as well as the diameter of G0).
2. Repeat the previous step but this time focusing on the average shortest
path length instead of the diameter.
3. Use the one-sample t-test to examine if the diameter of the undirected
network is significantly different than the diameter of the random networks at
a 95% significance level? What about the average shortest path length?
Part-4
1. Starting from the network G0 of Part-3, calculate the clustering coefficient
of each node, and then plot the C-CDF of the clustering coefficients (Please
show your x-axis and y-axis labels). Compare with the corresponding
distribution of a random network with the same number of nodes and
connection probability (as you did in Part-3). Use the Kolmogorov-Smirnov
test to compare the two distributions (you can find that test in the scipy
package).
2. Plot the average clustering coefficient (Please show your x-axis and yaxis labels), as a function of the node degree, for both G0 and for the
random network you constructed in Part 4.1. What do you observe?
3. Calculate the transitivity coefficient of the undirected network. Compare
with the transitivity coefficient of the 100 random networks that were
constructed in Part-3.
4. Combining the results of Part-3 and Part-4, can we conclude that G0 is a
small-world network or not (Please provide the reasons)?
Part-5
Recall that there are 13 different types of directed weakly-connected “node
triplets”.
First, count the number of type-5 (feed-forward loop : A->B->C with the additional
edge A->C) and type-9 (directed cycle :A->B->C->A) in the largest strongly
connected component (call it G1) of the original network.