[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 17:28:27 -0500 |
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