igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Can I subset a "communities" object based on communities si


From: Gábor Csárdi
Subject: Re: [igraph] Can I subset a "communities" object based on communities sizes?
Date: Sun, 24 Nov 2013 18:14:07 -0500

On Sun, Nov 24, 2013 at 6:00 PM,  <address@hidden> wrote:
>> then remove the vertices that correspond to communities that are small
>
>
> Does the vertices' weight in the contracted graph indicate the size of the
> communities used to contract the graph?

Assign a vertex attribute, set it to 1 for all vertices, and specify
in vertex.attr.comb that you want to sum this attribute over the
vertices merged. Or you can use a vertex attribute to create a mapping
between the contracted and the original vertices.

G.

> If not how can I practically find
> and "remove the vertices that correspond to communities that are small" in
> the contracted graph?
>
>
> Il 24.11.2013 22:28 Gábor Csárdi ha scritto:
>
>> On Sun, Nov 24, 2013 at 5:03 PM,  <address@hidden> wrote:
>>>
>>> I want to plot a community graph but after removing the smallest
>>> communities.
>>>
>>> Since I already have the "communities" object from the original (entire)
>>> graph, I hope I can use it to filter the subgraph (without running the
>>> community detection algorithm again on the subgraph). But of course it
>>> could
>>> be easier to run the algorithm again.
>>
>>
>> What does it mean to filter the subgraph? Isn't that already filtered?
>>
>>> This is the work-flow I thought to apply (but of course it could be
>>> totally
>>> wrong):
>>>
>>> graph -> fastgreedy.community(graph) -> communities ->
>>> induced.subgraph(graph's members of communities>20)
>>> -> subgraph -> contract.vertices(based on membership) ->
>>> large_communities_graph -> plot(large_communities_graph)
>>
>>
>> Yes, you can either do this, and create the community graph from the
>> subgraph. Just do membership(communities) to get the membership vector
>> and filter that the same way you filter the subgraph.
>>
>> Or, alternatively, you can do what I suggested in my first email,
>> create the community graph first, and then remove the vertices that
>> correspond to communities that are small.
>>
>> Gabor
>>
>>>
>>> Il 24.11.2013 21:52 Gábor Csárdi ha scritto:
>>>
>>>> I am missing something. So you want to remove vertices from the
>>>> community graph, or from the original graph?
>>>>
>>>> G.
>>>>
>>>
>>>
>>> _______________________________________________
>>> igraph-help mailing list
>>> address@hidden
>>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>>
>>
>> _______________________________________________
>> igraph-help mailing list
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help



reply via email to

[Prev in Thread] Current Thread [Next in Thread]