Dear Tiago,

I upgraded to the version 2.24 (commit 9642dd05, Sat Oct 7 23:40:03 2017
+0100) and tried calculating gt.assortativity and gt.scalar_assortativity
by making a property map's values same for all nodes.

In [1]: import graph_tool.all as gt

In [2]: gt.__version__
Out[2]: '2.24 (commit 9642dd05, Sat Oct 7 23:40:03 2017 +0100)'

In [3]: g = gt.collection.data['karate']

In [4]: s = g.new_vertex_property('float')

In [5]: for v in g.vertices():
   ...:     s[v] = 0.9999

In [6]: gt.scalar_assortativity(g, deg = s)
Out[6]: (1.0, 8.889098493616578)

In [7]: gt.assortativity(g, deg = s)
Out[7]: (nan, nan)

Shouldn't gt.scalar_assortativity also return (nan, nan) here?

Thank you
Snehal

On Sat, Oct 7, 2017 at 4:16 PM, Snehal Shekatkar <[email protected]>
wrote:

> Thank you very much all the clarification and patience. I really
> appreciate it.
>
> Thank you
> Snehal
>
> On Sat, Oct 7, 2017 at 4:13 PM, Tiago de Paula Peixoto <[email protected]>
> wrote:
>
>> On 07.10.2017 11:28, Snehal Shekatkar wrote:
>> > Yes, that's true. The documentation says: "degree type (“in”, “out” or
>> > “total”) or vertex property map, which specifies the vertex types".
>> Which
>> > means that the "deg" parameter can also be "in", "out" or "total"
>> degree. So
>> > if I understand correctly, one can treat say out degrees as discrete
>> > categories, but that just won't be very useful (from your previous
>> email).
>> > Is this right?
>>
>> Yes, that is right, otherwise I would not have written it in the
>> documentation.
>>
>> Whether or not it is useful depends on the circumstances. In general, for
>> scalar properties like degrees, scalar assortativity is more meaningful.
>>
>> --
>> Tiago de Paula Peixoto <[email protected]>
>>
>>
>> _______________________________________________
>> graph-tool mailing list
>> [email protected]
>> https://lists.skewed.de/mailman/listinfo/graph-tool
>>
>>
>
>
> --
> Snehal M. Shekatkar
> Pune
> India
>



-- 
Snehal M. Shekatkar
Pune
India
_______________________________________________
graph-tool mailing list
[email protected]
https://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to