Beginner questions (two-mode to one-mode)

118 views
Skip to first unread message

k der h

unread,
May 13, 2021, 7:49:43 PM5/13/21
to visone-users
Hi,
I'm a beginner trying to use Visone with a basic social network: I'm mainly loading a two-mode adjacency matrix and convert it to one-mode and do some visualization of it. But I'm hitting a few roadblocks:
  1. After converting to one-mode (using the network/two-mode/column transform), I believe the number of self-loop links on each node represent the total count of "members" in this category (values on the diagonal of the resulting matrix)? Is there some analysis to count these automatically for each node so I can use it as a node attribute for e.g. size mapping?
  2. The one-mode conversion creates two reciprocal links between nodes for each adjacency connection, is there a transformation where I can join these in reciprocal pairs, keeping multiple distinct connections, e.g. join 4 links (2 in each direction) to 2 undirected links? Or at least get their number (2) in an attribute after merging?
  3. Is there a way to create multi-line node labels to make the graphs more readable?
Thank you!

Müller Julian

unread,
May 16, 2021, 9:50:09 AM5/16/21
to visone...@googlegroups.com
Hi k der h,

> 1. After converting to one-mode (using the network/two-mode/column transform), I believe the number of self-loop links on each node represent the total count of "members" in this category (values on the diagonal of the resulting matrix)?

Yeah, a loop i -> i represents a pair of edges i <- k and k -> i. So the number of loops is the number of such pairs.

> Is there some analysis to count these automatically for each node so I can use it as a node attribute for e.g. size mapping?

One way would be like this:
Open the attribute manager (available from the toolbar at the top to the right of the zooming features) and navigate to configure (on the left)/links (at the top). Create a new attribute named "count" there with type "integer" and default "1". Then using transformation/links/loop to attribute, aggregate count into a node attribute by selecting "sum" as the reduction action. That will give you a node attribute "count_loop" with the number of incident loops. Similarly, you can also aggregate other attributes on loops.

Just a caveat: Currently, "loop to node attribute" always removes the loops from the network. If you still need the loops later, you will have to export the node attributes from the resulting network without loops and then reimport them into the original network with loops. You can do this again in the attribute manager: Navigate to import & export (left)/nodes (top), and use export on the resulting network and import on the original network.

> 2. The one-mode conversion creates two reciprocal links between nodes for each adjacency connection, is there a transformation where I can join these in reciprocal pairs, keeping multiple distinct connections, e.g. join 4 links (2 in each direction) to 2 undirected links? Or at least get their number (2) in an attribute after merging?

Getting the number of pairs of reciprocal links is possible. Getting undirected links representing matched pairs of reciprocal links should also not be a problem, at least as long as you don't care too much about their attributes. However, I currently can't think of a way to produce both reciprocal and unmatched directed links between a pair of nodes.

Anyway, to get the number of reciprocal pairs of links on a directed network, you can use the transformation/links/merge algorithm:
First, select "same direction" and check the "create multiplicity" box. This will merge all links in the same direction between two nodes into a single link, and the multiplicity attribute will contain the number of links that have been merged into it.
Next, uncheck the "create multiplicity" box, select "opposite direction" and then choose some appropriate combination action for the multiplicity attribute. In your case, I think both "min" and "multiply" could make sense. "min" would give you the maximum size of a matching of reciprocal links, and "multiply" would give you the total number of pairs of reciprocal links one could form (= the size of the Cartesian product). In your example, "min" would produce 2 and "multiply" would produce 4 for the multiplicity on the undirected link.
You can then split the single link with multiplicity attribute into several using the transformation/links/split algorithm.

> 3. Is there a way to create multi-line node labels to make the graphs more readable?

Not really. You can change the font size, but you can't tell visone to limit the horizontal size of a label and break the label text automatically when this limit would be exceeded.
It might also be possible to load text with line breaks into visone in some way, but I'm neither sure that visone would display these labels with line breaks then correctly nor which network format I/O handlers actually support loading line breaks currently.

Best,
Julian

Reply all
Reply to author
Forward
0 new messages