On 18.02.2016 15:37, scuenda wrote:
Imagine we consider a directed graph g, and its reverse graph h. Then, if we calculate goo = avg_neighbour_corr(g, "out", "out") hii = avg_neighbour_corr(h, "in", "in") I guessed both results should be the same, but they are not.
They are not the same because the direction of the edge is used to determine the source and target. Although the out- and in-degrees are swapped in the reversed graphs, so are the sources and targets. For example, if we have an edge: (a) -> (b) and the in,out-degrees of a and b are (0, 3) and (4, 1), respectively. This edge will count the value "4" in the average for sources with out-degree 0. Once we transpose the graph we have (a) <- (b) with in,out-degrees (3, 0), (1, 4). This edge now will contribute the value "3" in the average for sources with in-degree 1. It is not quite the same as before. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>