Hello,
I have a weighted graph in Gephi and I've been incrementally filtering out edges with weights less than some threshold. As I increase the threshold, I've been updating the node scaling to reflect the current degree of each node after thresholding. My initial expectation was to see all of the nodes get incrementally smaller from graph to graph as I increase the threshold. This would facilitate visual comparison across graphs with different thresholds. Instead what I'm seeing is that some nodes visibly increase in size after an increase in edge weight threshold. Given the degree should remain constant or decrease, I assume the node scaling process is the culprit. I assume one way this could happen is if the scaling algorithm maps the interval [min_degree, max_degree] to the set range of node sizes. If max_degree is decreasing and the range is fixed, node sizes would increase.
The interface seems to imply that's not happening as the user is given complete control over the domain and range of the mapping. I've kept both the domain and range fixed. Is there something I'm missing? Appreciate any clarification on how I should approach this.
Thanks,
Chris
[SOLVED] Node Scaling
Re: Node Scaling
Hi Chris,
If I understand you correctly, you want to have fixed values in node size mapped directly to fixed values in the attributes. As I understand the current setup, that's not possible. Everything is relative to the range you have set.
If you'd like and you have a small enough set of attributes, you can do so manually, by filtering just the part of the graph that has X attribute at Y value and then applying the size you want. This, of course, is completely absurd for any real situation, but you can script it in the Toolkit and that works out just fine.
If I understand you correctly, you want to have fixed values in node size mapped directly to fixed values in the attributes. As I understand the current setup, that's not possible. Everything is relative to the range you have set.
If you'd like and you have a small enough set of attributes, you can do so manually, by filtering just the part of the graph that has X attribute at Y value and then applying the size you want. This, of course, is completely absurd for any real situation, but you can script it in the Toolkit and that works out just fine.
-
- Posts:6
- Joined:24 Sep 2010 00: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: Node Scaling
Hi Elijah,
Am I correct in assuming that Gephi by default does a linear mapping of the domain (labeled as 'range' in the Gephi UI) to the range [min size, max size]?
Chris
Not sure I'm following here. The reason I am confused is because nodes increased in size as I filtered out more edges. Given I didn't touch either the domain or range of the mapping during that process, how is it possible that any of the nodes increased in size? The only possible explanation I can come up with is that Gephi is rescaling the range of the mapping.elijah wrote:If I understand you correctly, you want to have fixed values in node size mapped directly to fixed values in the attributes. As I understand the current setup, that's not possible. Everything is relative to the range you have set.
Am I correct in assuming that Gephi by default does a linear mapping of the domain (labeled as 'range' in the Gephi UI) to the range [min size, max size]?
Chris
Re: Node Scaling
Yes, Chris, linear is the default and yes, it's setting the new max value mapped to your static max size based on the visible graph. I thought you wanted a fixed size to a fixed value, for instance, all nodes with degree value 3 have size 3, which isn't possible without some Gephi gymnastics given that, as you're filtering out edges you're likely changing the scale.
Boy, that's hardly readable, here's an example:
I have a graph with 30 nodes and 300 edges, the most most connected node has 20 edges (Degree value of 20), the least connected has 1 edge (Degree value of 1).
I assign a size range based on degree value of 1 to 20--since I have a node with a degree of 1 and a node with a degree of 20, it's a direct mapping of size to degree.
I filter out some edges, now I my max connected node has a degree of 16, my min connected node has a degree of 2. When I update my size ranking, this means the smallest nodes (size 1) now represent degree values of 2 while my largest nodes (size 20) represent degree values of 16 and there's a linear mapping of size to degree for everything in between (my math is fuzzy at this point, but I can at least say that Degree value of 8 would have a size of 10, right?).
If, instead, you wanted your 16-Degree nodes to still be size 16, the only way you could do that is to isolate them and apply a size of 16 to them and do that for everything down the line. Not so much trouble to script, absolute carpal tunnel to do by hand.
Does that make sense?
Boy, that's hardly readable, here's an example:
I have a graph with 30 nodes and 300 edges, the most most connected node has 20 edges (Degree value of 20), the least connected has 1 edge (Degree value of 1).
I assign a size range based on degree value of 1 to 20--since I have a node with a degree of 1 and a node with a degree of 20, it's a direct mapping of size to degree.
I filter out some edges, now I my max connected node has a degree of 16, my min connected node has a degree of 2. When I update my size ranking, this means the smallest nodes (size 1) now represent degree values of 2 while my largest nodes (size 20) represent degree values of 16 and there's a linear mapping of size to degree for everything in between (my math is fuzzy at this point, but I can at least say that Degree value of 8 would have a size of 10, right?).
If, instead, you wanted your 16-Degree nodes to still be size 16, the only way you could do that is to isolate them and apply a size of 16 to them and do that for everything down the line. Not so much trouble to script, absolute carpal tunnel to do by hand.
Does that make sense?
-
- Posts:6
- Joined:24 Sep 2010 00: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: Node Scaling
That makes perfect sence Elijah. Appreciate the clarification. It's a very reasonable default behavior.
So my next question is the following: what is the purpose of the slider bar under the min and max size settings within the edge ranking panel? If that slider bar does control the domain of the mapping, I would expect that the change in the limits of the domain after edge thresholding would be reflected somehow in its settings. I didn't see that happen. In your example, it would seem that you could get the result I described by simply readjusting the limits of the domain to 1-20 with the slider bar.
Does that make sense?
Chris
So my next question is the following: what is the purpose of the slider bar under the min and max size settings within the edge ranking panel? If that slider bar does control the domain of the mapping, I would expect that the change in the limits of the domain after edge thresholding would be reflected somehow in its settings. I didn't see that happen. In your example, it would seem that you could get the result I described by simply readjusting the limits of the domain to 1-20 with the slider bar.
Does that make sense?
Chris
Re: Node Scaling
You can reduce the range within minimum and maximum values, in which case the transformation will only be applied within that range (the nodes or edges falling outside that range will maintain whatever styling you've provided them) but as soon as your min and max values constrain your set range, you're back in the same problem. Gephi does not, as far as I know, allow you to set a range below the minimum and above the maximum value, though it probably should to give fixed results like those you're looking for.
-
- Posts:6
- Joined:24 Sep 2010 00: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: Node Scaling
Ok cool. That makes sense. Thanks again for all the feedback Elijah. Much appreciated.
Chris
Chris
- 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: [SOLVED] Node Scaling
This issue is tracked in the issue 541.
A new button is implemented in trunk to select 'local' scale when filtering is active. By default the scale is global so comparaison is possible.
A new button is implemented in trunk to select 'local' scale when filtering is active. By default the scale is global so comparaison is possible.