Projecting two-mode networks onto weighted one-mode networks

May 1, 2009

Two-mode networkMany network dataset are by definition two-mode networks (also known as affiliation or bipartite networks). These are a particular type of networks with two sets of nodes and ties are only established between nodes belonging to different sets. This diagram illustrates a binary two-mode network where the colour represent the node set to which a node belongs. One of the first two-mode datasets to be analysed was the Davis Southern Club Women dataset (Davis et al., 1941), which recorded the attendance of a group of women (node set 1) to a series of events (set 2). A woman would be linked to an event if she attended it. Another type of two-mode dataset that has become popular in recent years is scientific collaboration networks. In this type of networks, a tie is established between a scientist (node set 1) and a paper (node set 2) if the scientist authored that paper (e.g., Newman, 2001)

Binary one-mode projectionFew network measures exist for two-mode networks, and therefore, these networks are often projected onto a one-mode network (only one type of nodes). This is done by selecting one of the sets of nodes and linking two nodes from that set if they were connected to the same node (of the other kind). This process is illustrated for the blue nodes of the above diagram in this diagram. For example, node E and node F are connected to the same red node, therefore, in the one-mode projection they are tied together.

Simple weighted one-mode projectionTraditionally, the ties in projected one-mode networks do not have weights attached to them. However, recent empirical studies of two-mode networks has created a weighted one-mode network by defining the weights as the number of co-occurrences (e.g., the number of events two individuals have co-attended or the number of papers that two authors had collaborated on). To formally describe this method and ease the comparison among the different methods introduced in this post, this method can be formalised as: w_{ij} = \sum_p 1 where where w_{ij} is the weight between node i and node j, and p is the nodes of the other kind that node i and node j are connected to, their co-occurrences (e.g., the red nodes in the above diagram). In the sample network, the tie between node A and node B has a weight of 2 as these two nodes have connections to two common red nodes, whereas the tie between node A and node C has only a weight of 1 as these nodes have connections to merely one common red node.

One-mode projection using Newman's (2001) method for defining tie weightsNewman (2001) extended this procedure while working with scientific collaboration networks. He argued that the social bonds among scientist collaborating with few others on a paper were stronger than the bonds among scientists collaborating with many on a paper. He proposed to discount for the size of the collaboration by defining the weights among the nodes using the following formula: w_{ij} = \sum_p \frac{1}{N_p - 1} where N_p is the number of authors on paper p (e.g., the number of blue nodes connected to the red node p). In the context of scientific collaboration networks, this implies that if two scientists who only write a single paper together with no other co-authors get a weight of 1 (e.g., node B and node D). Moreover, if two scientists have written two papers together without any co-author, the weight of their tie would be 2 (e.g., node B and E). However, if the two scientists have a co-author, the weight on the tie between them is 0.5 (e.g., node A and node C). A more complicated example is the tie between node A and node B in the diagram. They have written two papers together: one without any other co-author and one with node C as a co-author. The first paper would give their tie a weight of 1, and the second tie would add 0.5 to the weight of this tie. Therefore, the weight attached to their tie is 1.5. By discounting for the number of blue nodes attached to the same red node, this methods creates a one-mode projection in which the strength of a node is equal to the number of ties originating from that node in the two-mode network (e.g. the sum of weights attached to ties originating from node A in the one-mode projection is 2, and node A is connected to two red nodes).

Weighted two-mode networkSo far this post has only dealt with binary two-mode networks. However, weighted two-mode networks also exist. For example, in online forums, where the node sets are users and threads (or topics), and a tie between two nodes is established if a user posts a message to a thread, it is possible to differentiate the two-mode ties based on the number of messages or characters posted by users to a specific thread. Thus creating a weighted two-mode network. By including the weights in the two-mode network, the data used for analysis is richer than if they were discarded.

Note: The weights of the directed ties are placed close to the node that the ties originate from. For example, the tie from node B to node D has a weight of 4, whereas the tie from node D to node B has a weight of 6.

Note: The weights of the directed ties are placed close to the node that the ties originate from. For example, the tie from node B to node D has a weight of 4, whereas the tie from node D to node B has a weight of 6.

In a similar spirit as simply the number of co-occurrence for a binary two-mode network, the one-mode projection of a weighted two-mode network could be based on the weights the two nodes have directed towards common nodes (of different kind). In addition, with such a method it is possible to differentiate how the two nodes interact with the common node, and to project it onto a directed weighted one-mode network. In this type of projected network, the weight of a tie from a node to another is not necessarily the same as the weight attached to the tie from the latter node to the former node. It is not a truly directed network as two directed ties exist between any connected node pair. More specifically, all dyads are composed of either two directed ties (mutual) or no directed ties (null), and no dyads are made of a single directed tie (asymmetric). For example, if the diagram above referred to an online forum, node B has posted 4 messages in to a thread that node D participate in, thus giving the directed tie between node B and node D in the one-mode projection a weight of 4. Conversely, node D posted 6 messages to that thread, and therefore, the weight attached to the tie from node D to node B is equal to 6. This method can be formalised as follows: w_{ij} = \sum_p w_{i,p}.

Note: The weights of the directed ties are placed close to the node that the ties originate from. For example, the tie from node B to node D has a weight of 4, whereas the tie from node D to node B has a weight of 6.In a similar spirit as the method used by Newman (2001), it is also possible to discount for the number of nodes when projecting weighted two-mode networks. For example, it could be argued that if many online users post to a thread, their ties should be weaker than if there were few people posting to the thread. A straight forward generalisation is the following function: w_{ij} = \sum_p \frac{w_{i,p}}{N_p - 1}. This formula would create a directed one-mode network in which the out-strength of a node is equal to the sum of the weights attached to the ties in the two-mode network that originated from that node. For example, node C has a tie with a weight of 5 in the two-mode network and an out-strength of 5 in the one-mode projection.

Want to test it with your data?

Binary two-mode networks

The following code requires a binary two-mode network to be listed in an edgelist format with two columns named i and p. The i column refers to the nodes you would like to keep in the one-mode projection (e.g., the blue nodes), and the p column refers to the nodes you would like to discard (e.g., the red nodes). The binary two-mode network in the diagram above can be loaded using the following function.

net <- cbind(
i=c(1,1,2,2,2,2,2,3,4,5,5,5,6),
p=c(1,2,1,2,3,4,5,2,3,4,5,6,6))

The one-projections highlighted above can be created using the following code:

# Load tnet
library(tnet)

# Binary one-mode projection
projecting_tm(net, method="binary")

# Simply the number of common red nodes
projecting_tm(net, method="sum")

# Newman's method
projecting_tm(net, method="Newman")

Weighted two-mode networks

The following code requires a weighted two-mode network to be listed in an edgelist format with three columns named i, p, and w. The i column refers to the nodes you would like to keep in the one-mode projection (e.g., the blue nodes), the p column refers to the nodes you would like to discard (e.g., the red nodes), and the w column must be the weight of the ties. The weighted two-mode network in the diagram above can be loaded using the following function.

net.w <- cbind(
i=c(1,1,2,2,2,2,2,3,4,5,5,5,6),
p=c(1,2,1,2,3,4,5,2,3,4,5,6,6),
w=c(4,2,2,1,4,3,2,5,6,2,4,1,1))

The one-projections highlighted above can be created using the following code:

# Load tnet
library(tnet)

# Simply the sum of weights towards common red nodes
projecting_tm(net.w, method="sum")

# Generalisation of Newman's method
projecting_tm(net.w, method="Newman")

References

Davis, A., Gardner, B. B., Gardner, M. R., 1941. Deep South. University of Chicago Press, Chicago, IL.

Newman, M. E. J., 2001. Scientific collaboration networks. II. Shortest paths, weighted networks, and centrality. Physical Review E 64, 016132.

Please cite or link to this post if you use it.

Entry Filed under: Network thoughts. Tags: , , , , , , , , , , , , , , , , , , , .

2 Comments Add your own

  • 1. Matthieu Latapy  |  December 26, 2009 at 9:53 am

    Nice post! You may also have a look at my paper in Social Networks in which I argue that bipartite/affiliation/2-mode networks should not be projected but studied directly as such. Indeed, projection raises several issues, including loss of information and inflation of the number of links.

    See the paper:
    Basic Notions for the Analysis of Large Two-mode Networks.
    Matthieu Latapy, Clémence Magnien and Nathalie Del Vecchio
    Social Networks (2008), vol. 30, no1, pp. 31-48.

    Reply
    • 2. Tore Opsahl  |  December 26, 2009 at 1:49 pm

      Thank you!

      Trying to coerce networks into being static, one-mode, undirected, and binary is in fact one of the largest problems we have when analysing networks. My thesis was devoted to weighted network, whereas I’m recently dealing with two-mode networks. In particular, I have worked on a paper on clustering coefficient for two-mode networks. The global version is on this blog, and the local version will be put up January. Together they will hopefully make a paper on clustering in two-mode networks. The local coefficient that I propose is slightly different from the Jaccard coefficient you suggested in the paper.

      Reply

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Welcome

Tore OpsahlMy aim for this blog is to explore and throw out in the open some of the ideas about social network analysis that I have, but no time to implement. Many of my ideas stem from my interest in weighted networks and my belief that the weights are an enormous source of data. However, many social network measures require that the weights are discarded. In so doing, the richness of the data is considerably reduced. In turn, this limits the analysis.

Recent Posts

Upcoming Posts

Creating an ensemble of binary networks from a weighted one

Closeness in weighted networks

tnet: Software for Analysing Two-Mode Networks

Links

Feeds

Licensing

The information on this blog is published under the Creative Commons Attribution-Noncommercial 3.0-lisence.

This means that you are free to:
· share (copy, distribute and transmit)
· remix (adapt)
under the following conditions:
· attribution (you must cite this blog)
· noncommercial (you may not use it for
   commercial purposes).