Bipartite layout

User's perspective on software quality
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
TomAug85
Posts:5
Joined:21 Apr 2011 14:02
Location:Oxford, UK
[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
Bipartite layout

Post by TomAug85 » 28 Apr 2011 16:38

I wonder if there is anyone willing to implement this?

A bipartite graph represents the interactions between two node classes, usually predator-prey, pollinator-plant, or individual and roost/nest site.

I'm new to these forums so sorry for any newbie errors.

A standard network of this type may look like this in a force atlas layout:

Image

There are two classes of node in this network, those that are grey and those with colour. You could think of the grey nodes as bees and the coloured nodes as different plants they forage at or humans and bars they drink at (please ignore the lines between the coloured nodes for this example)

To make better sense of this these types of network should be displayed like this:

Image

Here the same nodes are represented but in a two-tiered format that is easier to interpret. I did this one by hand. The nodes of each class need to be restricted to specific y-coordinates and then to be distributed uniformly along the x-axis. Nodes from the higher tier with similar connections to the lower tier should be placed close to each other.

Thoughts/questions welcome

EDIT: I tried to get the images to work... kinda got some of it!
Last edited by TomAug85 on 03 May 2011 11:25, edited 1 time in total.

User avatar
rotten
Posts:34
Joined:27 Aug 2010 14:42
Location:Columbus, Ohio
[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: Bipartite layout

Post by rotten » 28 Apr 2011 17:45

images?

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

Re: Bipartite layout

Post by seinecle » 29 Apr 2011 08:10

Yes, please re-post with pictures.

From your text, it seems that the geo-layout plugin could be used to manipulate the position of the nodes according to the set they belong to.

But I jump in on a related issue: bipartite graphs call for different metrics (of centrality, clusterization, etc.) and types of manipulations (one could want to filter on one set of nodes, not on the other, or have just one set which is dynamic, while the other would remain static, etc.).

Arguably, this would call for a dedicated approach. The same way "directed / undirected" is thought about in the definition of the gexf format and Gephi features, in a perfect world, the same work would be done for simple / bipartite graphs. What are the developers of Gephi thinking about that?

Best,

Clement

a.oboturov
Posts:4
Joined:06 Apr 2011 10:58
Location:Paris, France
[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: Bipartite layout

Post by a.oboturov » 02 May 2011 18:50

The file with a sample bipartite graph is attached. Reds and blues denotes two different parts respectively.
Attachments
bipartite.graph.example.pdf
Example of bipartite graph for which a layout could be applied
(4.13KiB)Downloaded 1365 times
Last edited by a.oboturov on 06 May 2011 01:29, edited 1 time in total.

TomAug85
Posts:5
Joined:21 Apr 2011 14:02
Location:Oxford, UK
[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: Bipartite layout

Post by TomAug85 » 03 May 2011 11:16

Sorry about that, figures are attached
Attachments
Binder2.pdf
Atlas projection (page 1) and Bipartite projection (Page 2)
(47.26KiB)Downloaded 912 times

admin
Gephi Community Manager
Posts:964
Joined:09 Dec 2009 14:41
[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: Bipartite layout

Post by admin » 04 May 2011 14:56

Yup, I filled the idea list. Also don't hesitate to pledge for this feature on Fundry: https://fundry.com/project/20-gephi

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: Bipartite layout

Post by mbastian » 04 May 2011 15:58

Arguably, this would call for a dedicated approach. The same way "directed / undirected" is thought about in the definition of the gexf format and Gephi features, in a perfect world, the same work would be done for simple / bipartite graphs. What are the developers of Gephi thinking about that?
I dont'think Bipartite (pr N-partite) are at the same level as directed/undirected, but yes they need dedicated tools and algorithms.

a.oboturov
Posts:4
Joined:06 Apr 2011 10:58
Location:Paris, France
[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: Bipartite layout

Post by a.oboturov » 06 May 2011 01:18

For example, import plugin modification which enables import of bipartite graphs from Pajek and DL files.
Attachments contain diff's from REV-2212 of branch nick: gephi.

Artem
Attachments
ImporterPajek.txt
(10.25KiB)Downloaded 601 times
ImporterDL.txt
(8.37KiB)Downloaded 522 times

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

Re: Bipartite layout

Post by seinecle » 14 May 2011 17:38

Hey Tom,

You can manipulate the positioning of specific nodes with the Geolayout. You can download it with Tools -> Plugin. Use it to give particular coordinates to your predators (say, arrange them on a certain latitude), and other coordinates to the preys (say, on a different latitude). Use longitude to express another attribute (frequency of capture, protein intake or whatever is relevant in your data!)

Another and quicker solution would work if you have a small network: "fix" your predators (or preys...) by right-clicking on them and select "settle". Then, apply the Force Atlas layout (or any other of your choice), and your predators will remain in position, while the preys will be rearranged according to the logic of the layout. Play with the position of your predators until you get a satisfying result.

These are second best solutions, but I hope they might help. Do not hesitate to send me a private email if you want to discuss more about these solutions.

Finally, I'd suggest you to have a look at ORA (developed at Carnegie Mellon, part of the CASOS (sic) package: http://www.casos.cs.cmu.edu/projects/ora/

This free software has some capabilities for the display and analysis of bipartite (and n-partite) networks. But the visualizations are simply not on par with those of Gephi...

Best,

Clement

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

Re: Bipartite layout

Post by seinecle » 09 Oct 2013 13:28

Note for those who subscribed to this thread: the alphabetical sorter layout (https://marketplace.gephi.org/plugin/al ... al-sorter/) can help achieve the kind of viz suggested here for a bipartite layout:

- nodes in the network need to be partition-able in the two classes of nodes. For example, they should have an attribute with 2 different values to represent each of the class.

- filter the network (using the partition filter) to display just one class of nodes.

- apply the alphabetical sorter layout.

- unfilter, now filter the other class of nodes (again, using the partition layout).

- apply the alphabetical sorter layout, with paramters adjusted so that the new class of nodes gets positioned on the left or right of the first class of nodes.

Issues: for more than a hundred of nodes in each class, and lots of edges (1,000 or so), the graph remains cluttered. Other viz strategies are needed then, that remain to be invented.

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