[SOLVED] Edge weight range filter that also hides nodes

Visual manipulations and refinements
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
kazlik
Posts:6
Joined:03 May 2011 18:29
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[SOLVED] Edge weight range filter that also hides nodes

Post by kazlik » 02 Jun 2011 18:50

How do I build a filter with weight range that also hides the nodes that have 0 degree after I adjust the weight range?

User avatar
seinecle
Gephi Community Support
Posts:546
Joined:08 Feb 2010 16:55
Location:Lyon, France
Contact:

Re: Edge weight range filter that also hides nodes

Post by seinecle » 03 Jun 2011 06:42

Hi,

I always have this problem as well. I am not sure if there is a solution, since you would like to filter (degree = 0) on the results of a filter (weight > n), rather than applying these two filters simultaneously. Not sure that the current logic of the filters allows that? (with Gephi 0.6 alpha, this would have been straightforward, since one filter could be applied to the results of the previous one, in a sequence. Good old days ;-))


Waiting for a better solution, here is the dirty fix I use: I do it in two times:
- filter 1 (say, weight > n), which leaves out some isolated nodes.
- I export the result to a new workspace.
- filter 2 (say, degree > 0) which keeps only the connected nodes.

Is it what you did already?

Best,

Clement

User avatar
mbastian
Gephi Architect
Posts:728
Joined:10 Dec 2009 10:11
Location:San Francisco, CA
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Edge weight range filter that also hides nodes

Post by mbastian » 03 Jun 2011 06:59

I always have this problem as well. I am not sure if there is a solution, since you would like to filter (degree = 0) on the results of a filter (weight > n), rather than applying these two filters simultaneously. Not sure that the current logic of the filters allows that? (with Gephi 0.6 alpha, this would have been straightforward, since one filter could be applied to the results of the previous one, in a sequence. Good old days )
Gephi can totally do that, as it supports chained filters. You build filters like you would build nested SQL queries, and in your case your are trying to do DEGREE_RANGE(WEIGHT_RANGE)). The result of the inner filter is given to the outer filter.

The procedure is quite straightforward:
1. Create a DEGREE RANGE and WEIGHT RANGE FILTERS.
2. Click on the Degree Range + button. You will see a 'Drag subfilter here' message.
3. Drag the Weight Range filter there and select it. The parameters appear at the bottom.
4. Select your weight range
5. Now select the Degree Range filter, the parameters appear at the bottom.
6. Move the lower bound to 1 to exclude 0 degree
7. Click on Filter to enable Filtering.

User avatar
seinecle
Gephi Community Support
Posts:546
Joined:08 Feb 2010 16:55
Location:Lyon, France
Contact:

Re: Edge weight range filter that also hides nodes

Post by seinecle » 03 Jun 2011 07:16

Learning everyday... thx!

User avatar
mbastian
Gephi Architect
Posts:728
Joined:10 Dec 2009 10:11
Location:San Francisco, CA
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Edge weight range filter that also hides nodes

Post by mbastian » 03 Jun 2011 07:42

My pleasure ;)

elijah
Gephi Community Support
Posts:169
Joined:11 Sep 2010 18:09
Location:Stanford, CA
Contact:

Re: Edge weight range filter that also hides nodes

Post by elijah » 03 Jun 2011 08:32

The important thing to note is that if the lowest Degree value is 1 (in other words, if you have connections to all nodes) then when you first have the degree filter up, it will helpfully try to change the min value to the current minimum of the graph, moving from 1 to 0 when you start filtering edges. It is helpful, at least it better be, because when it didn't do that, I reported it as a bug. This means that you need to manually update your Degree Range filter after you set your edge weight filter.

Also, if you start playing around with in-degree/out-degree coupled with edge filtering, you can get some very interesting changes.

kazlik
Posts:6
Joined:03 May 2011 18:29
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Edge weight range filter that also hides nodes

Post by kazlik » 03 Jun 2011 15:35

Thanks for the reply, and also learning every day. That worked perfectly.

aynok18
Posts:2
Joined:07 Nov 2013 17:33
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: [SOLVED] Edge weight range filter that also hides nodes

Post by aynok18 » 20 Dec 2013 21:03

I just tried to do this with my network, and while I get the edges to disappear based on filtering,I can still see the nodes that now have zero edges.
If I increase the degree range filter some nodes do disappear, but plenty of others without edges remain. I confirmed in the data laboratory that these edges no longer have nodes.

I know your post was over 2 years ago, so wondering if there is a different way to accomplish this with the update Gephi?

Thanks.

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable