Hi everyone, congratulations for this amazing tool!
I have a question regarding the usage of the degree_distribution method: link
To my understanding, plotting the result of:
degree_distribution(graph, cumulative = TRUE)
is to generate the so-called Complementary Cumulative Degree Distribution (CCDF of degree), am I right?
in other words, the plot shows the number of vertices with degree at least k for every value of k, is it correct? Can anyone confirm this?
Hi, thank you for your response. I was curious to understand why degree_distribution:
dg2 = degree_distribution(g, cumulative=TRUE, mode="in")
dg2 = dg2[dg2 > 0] # filter out 0 values to plot on a log-log
and the following custom code:
dist = degree(g, mode="in)
dg1 = list();
for (i in 1:max(dist)) { # I start from 1 rather than 0 because I want to plot on a log-log
dg1[i] = length(dist[dist >= i]) / length(dist);
}
I don’t use R, but this: dg2 = dg2[dg2 > 0] seems wrong to me. If you drop the k th element, the k+1 th becomes the k th. It is no longer true that the k th element is the frequency of degree k-1.
…it doesn’t make any difference, the result is the same. That line of code doesn’t affect the plot. Also, if k becomes k+1, the situation should be made even by the fact that in the for loop I am not counting the 0, so also in that case I should have k that becomes k+1…