Dear Tiago, Graph-tool is a great and ultra-fast library. It saved me tons of hours doing some statistics with heavy graphs. Thank you so much for your great work. However, right now I'm having some troubles with the function avg_neighbour_corr. I must missing something, but I don't know what it is.
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. It must be related to the results of the function corr_hist, which returns the transposed matrix of g for h. However, I fail to see why, considering that the in-degree vertex property of h is the same as the out-degree vertex property of g, and all edges are reversed in h. Any help, please? Thanks in advance. Best, Sara. PS: Here is the code of a dummy example for a network g given by: (2) <==> (0) ----> (1) ----> (2) #### code g = gt.Graph() g.add_edge_list([(0,1), (0,2), (1,2), (2,0)]) h = gt.GraphView(g, reversed = True) goo = avg_neighbour_corr(g, "out", "out") hii = avg_neighbour_corr(h, "in", "in") #### end of code #### results # >>> goo[0] # array([ nan, 1.5, 1. ]) # >>> hii[0] # array([ nan, 1.66666667, 1. ]) -- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/About-avg-neighbour-corr-tp4026410.html Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com. _______________________________________________ graph-tool mailing list [email protected] http://lists.skewed.de/mailman/listinfo/graph-tool
