problems with assortativity coefficient
Hi, I'm trying to compute Newman's assortativity coefficient with graph-tool, but I'm getting unexpected high values of r. Here's a test: graph-tool --correlated-configurational-model="N=20000,inv_pjk_ceil=\"(inv_poisson(p,5) ,inv_poisson(r,5))\",progress" \ --save graph.xml graph-tool --load graph.xml --assortativity-coefficient="total-degree" this is what I get: assortativity coefficient (total-degree) 0.2105496706333980228 0.0036187517305024605174 The assortativity value above should be very close to zero as the network is uncorrelated, but it's reasonably large. Also, when I try: graph-tool --load graph.xml --scalar-assortativity-coefficient="total-degree" graph-tool crashes: Traceback (most recent call last): File "/usr/bin/graph-tool", line 494, in <module> _main() File "/usr/bin/graph-tool", line 470, in _main run(parsed_options) File "/usr/bin/graph-tool", line 356, in run output_file = opt[0].output_file AttributeError: OptionMask instance has no attribute 'output_file' I'm running graph-tool 1.2.0devel (commit 8b98b8c6, Sun Jul 20 11:46:39 2008 +0200) Am I missing something obvious? many thanks, Rui
Hi. The problem you reported with the second option is now fixed in git. I however cannot see high values of assortativity: graph-tool --correlated-configurational-model="N=20000,inv_pjk_ceil=\"lambda p,r: (inv_poisson(p,5), inv_poisson(r,5))\"" --assortativity-coefficient="total-degree" --scalar-assortativity-coefficient="total-degree" # assortativity coefficient (total-degree) 0.089740322372172054433 0.00391706558657752002 # scalar assortativity coefficient (total-degree) 0.0024758906274759966311 0.0031450246340287649899 Please test with the version now in git, and see if you still see the same problem. Cheers, Tiago On 11/17/2008 01:28 AM, Rui Carvalho wrote:
Hi,
I'm trying to compute Newman's assortativity coefficient with graph-tool, but I'm getting unexpected high values of r.
Here's a test:
graph-tool --correlated-configurational-model="N=20000,inv_pjk_ceil=\"(inv_poisson(p,5) ,inv_poisson(r,5))\",progress" \
--save graph.xml
graph-tool --load graph.xml --assortativity-coefficient="total-degree"
this is what I get:
assortativity coefficient (total-degree)
0.2105496706333980228 0.0036187517305024605174
The assortativity value above should be very close to zero as the network is uncorrelated, but it's reasonably large.
Also, when I try:
graph-tool --load graph.xml --scalar-assortativity-coefficient="total-degree"
graph-tool crashes:
Traceback (most recent call last):
File "/usr/bin/graph-tool", line 494, in <module>
_main()
File "/usr/bin/graph-tool", line 470, in _main
run(parsed_options)
File "/usr/bin/graph-tool", line 356, in run
output_file = opt[0].output_file
AttributeError: OptionMask instance has no attribute 'output_file'
I'm running graph-tool 1.2.0devel (commit 8b98b8c6, Sun Jul 20 11:46:39 2008 +0200)
Am I missing something obvious?
many thanks,
Rui
------------------------------------------------------------------------
_______________________________________________ graph-tool mailing list graph-tool@forked.de http://lists.forked.de/mailman/listinfo/graph-tool
-- Tiago de Paula Peixoto <tiago@forked.de>
Hi, After installing the new ver I get the same results as you do. However, I get an error when I type the following (taken from the documentation): graph-tool --correlated-configurational-model="N=20000,inv_pjk_ceil=\"(inv_poisson(p,5) ,inv_poisson(r,5))\",progress" \--save graph.xml.bz2 returns: adding vertices: 1 of 20000 (0%)graph-tool: error during evaluation of command --correlated-configurational-model=N=20000,inv_pjk_ceil="(inv_poisson(p,5),i nv_poisson(r,5))",progress: <lambda>() takes no arguments (2 given) My understanding is that the documentation is somehow partially out-of-date due to the ongoing upgrade of graph-tool, but I just wanted to check that this is the reason for the error I'm getting. Cheers, Rui -----Original Message----- From: graph-tool-bounces@forked.de [mailto:graph-tool-bounces@forked.de] On Behalf Of Tiago de Paula Peixoto Sent: 18 November 2008 19:55 To: Main discussion list for the graph-tool project Subject: Re: [graph-tool] problems with assortativity coefficient Hi. The problem you reported with the second option is now fixed in git. I however cannot see high values of assortativity: graph-tool --correlated-configurational-model="N=20000,inv_pjk_ceil=\"lambda p,r: (inv_poisson(p,5), inv_poisson(r,5))\"" --assortativity-coefficient="total-degree" --scalar-assortativity-coefficient="total-degree" # assortativity coefficient (total-degree) 0.089740322372172054433 0.00391706558657752002 # scalar assortativity coefficient (total-degree) 0.0024758906274759966311 0.0031450246340287649899 Please test with the version now in git, and see if you still see the same problem. Cheers, Tiago On 11/17/2008 01:28 AM, Rui Carvalho wrote:
Hi,
I'm trying to compute Newman's assortativity coefficient with graph-tool, but I'm getting unexpected high values of r.
Here's a test:
graph-tool
--correlated-configurational-model="N=20000,inv_pjk_ceil=\"(inv_poisson(p,5)
,inv_poisson(r,5))\",progress" \
--save graph.xml
graph-tool --load graph.xml --assortativity-coefficient="total-degree"
this is what I get:
assortativity coefficient (total-degree)
0.2105496706333980228 0.0036187517305024605174
The assortativity value above should be very close to zero as the network is uncorrelated, but it's reasonably large.
Also, when I try:
graph-tool --load graph.xml --scalar-assortativity-coefficient="total-degree"
graph-tool crashes:
Traceback (most recent call last):
File "/usr/bin/graph-tool", line 494, in <module>
_main()
File "/usr/bin/graph-tool", line 470, in _main
run(parsed_options)
File "/usr/bin/graph-tool", line 356, in run
output_file = opt[0].output_file
AttributeError: OptionMask instance has no attribute 'output_file'
I'm running graph-tool 1.2.0devel (commit 8b98b8c6, Sun Jul 20 11:46:39 2008 +0200)
Am I missing something obvious?
many thanks,
Rui
------------------------------------------------------------------------
_______________________________________________ graph-tool mailing list graph-tool@forked.de http://lists.forked.de/mailman/listinfo/graph-tool
-- Tiago de Paula Peixoto <tiago@forked.de> _______________________________________________ graph-tool mailing list graph-tool@forked.de http://lists.forked.de/mailman/listinfo/graph-tool
On 11/21/2008 06:27 PM, Rui Carvalho wrote:
Hi,
After installing the new ver I get the same results as you do. However, I get an error when I type the following (taken from the documentation):
graph-tool --correlated-configurational-model="N=20000,inv_pjk_ceil=\"(inv_poisson(p,5) ,inv_poisson(r,5))\",progress" \--save graph.xml.bz2
returns: adding vertices: 1 of 20000 (0%)graph-tool: error during evaluation of command --correlated-configurational-model=N=20000,inv_pjk_ceil="(inv_poisson(p,5),i nv_poisson(r,5))",progress: <lambda>() takes no arguments (2 given)
My understanding is that the documentation is somehow partially out-of-date due to the ongoing upgrade of graph-tool, but I just wanted to check that this is the reason for the error I'm getting.
Yes, there is a discrepancy with the documentation. You should do: "lambda p,r: (inv_poisson(p,5), inv_poisson(r,5))". All this will be largely deprecate with the new version of graph-tool as (purely) a python library. It should be coming out "real soon now"™, and will include up-to-date documentation. Cheers, Tiago -- Tiago de Paula Peixoto <tiago@forked.de>
participants (2)
-
Rui Carvalho -
Tiago de Paula Peixoto