Network Node Group Section
Film actors Actor Cast of a film 4.5
Coauthorship Author Authors of an article 4.5
Boards of directors Director Board of a company 4.5
Social events People Participants at social event 4.1
Recommender system People Those who like a book, film, etc. 3.3.2
Keyword index Keywords Pages where words appear 3.3.3
Rail connections Stations Train routes 2.4
Metabolic reactions Metabolites Participants in a reaction 5.1.1
Table 6.2: Hypergraphs and bipartite graphs. Examples of networks that can be represented as hypergraphs or equivalently as bipartite graphs. The last column gives the section of this book in which each is discussed.
Table 6.2 for more examples.
We will, however, talk very little about hypergraphs in this book, because there is another way of representing the same information that is more conve- nient for our purposes—the bipartite network.
6.6 B
ipartite networks
Abipartite network, also called atwo-mode networkin the sociology literature, is
a network with two kinds of nodes, and edges that run only between nodes We discussed bipartite net- works previously in the context of recommender networks in Section 3.3.2, affiliation networks in Sec- tion 4.5, and metabolic net- works in Section 5.1.1.
of different kinds—see Fig. 6.5. Bipartite networks are most commonly used to represent the membership of a set of people or objects in groups of some kind. The people are represented by one set of nodes, the groups by the other, and edges join the people to the groups to which they belong. When used in this way a bipartite network captures exactly the same information as the hypergraphs of Section 6.5 (see Fig. 6.4) but for most purposes the bipartite graph is more convenient and it is certainly more widely used. We will use bipartite graphs frequently throughout this book.
For example, we can represent the network of film actors discussed in Section 4.5 as a bipartite network in which the two types of node are actors and films, and the edges connect actors to the films in which they appear.
There are no edges that directly connect actors to other actors, or films to other films; the edges in a bipartite network only connect nodes of unlike kinds.
As another example consider a recommender network, such as a network of who likes which books (see Section 3.3.2). The two types of nodes would then represent people and books, with edges connecting people to the books they like. Table 6.2 gives a number of further examples.
Figure 6.5: A small bipartite network.
The open and closed circles represent two types of nodes and edges run only between nodes of different types. It is common to draw bipartite networks with the two sets of nodes arranged in lines, as here, to make the bipartite structure clearer. See Fig. 4.2 on page 50 for another example.
Bipartite networks do also occur occasionally in contexts other than membership of groups. For instance, there have been studies in the public health literature of networks of sexual contact—who sleeps with whom [271, 305, 392, 417]. If one were to construct such a network for a heterosexual population then the network would be bipartite, the two kinds of nodes corresponding to men and women and the edges corresponding to sexual contacts. (A network repre- senting gay men or women on the other hand, or straight and gay combined, would probably not be bipartite.)
One occasionally also comes across bipartite networks that are directed. For example, the metabolic networks discussed in Sec- tion 5.1.1 can be represented as directed bipartite networks—see Fig. 5.1a. Weighted bipartite networks are also possible in principle, although no examples will come up in this book.
6.6.1 The incidence matrix and network projections
The equivalent of the adjacency matrix for an (undirected unweighted) bipartite network is a rectangular matrix called theincidence matrix. Ifnis the number of items or people in the network and 1 is the number of groups, then the incidence matrixBis a1×nmatrix having elementsBi jsuch that
Bi j
1 if item jbelongs to groupi,
0 otherwise. (6.8)
For instance, the 4×5 incidence matrix of the network shown in Fig. 6.4b is
B ©
«
1 0 0 1 0
1 1 1 1 0
0 1 1 0 1
0 0 1 1 1
ª
®
®
®
¬
. (6.9)
Although a bipartite network may give the most complete representation of a particular system it is not always the most convenient. In some cases we would prefer to work with a network with only one type of node—a network of people alone, for instance, without the group nodes. One way to create such a network is to get rid of the group nodes and directly join together any two people who belong to the same group, creating a so-calledone-mode projection of the two-mode bipartite form.
6.6 | B
ipartite networks
A B C D
1 2 3 4 5 6 7
B A
C D
2 5
7
6 4
3 1
Figure 6.6: The two one-mode projections of a bipartite network. The central portion of this figure shows a bipartite network with four nodes of one type (open circles labeled A to D) and seven of another (filled circles, 1 to 7). At the top and bottom we show the one-mode projections of the network onto the two sets of nodes.
As an example, consider again the case of the films and actors. The one-mode projection onto the actors alone is the n-node network in which the nodes represent the actors and there is an undirected edge connecting any two actors who have appeared together in one or more films. We can also create a one-mode projection onto the films, which is the 1- node network where the nodes represent films and two films are connected if they share one or more common actors. Every bipartite network has two one-mode projections in this way, one onto each of its types of nodes. Figure 6.6 shows the two one-mode projections of a small bipartite network.
When we form a one-mode projection, each group in the bipartite network results in a cluster of nodes in the projected network that are all connected to each other—a “clique” in network jargon (see Section 7.2.1). For instance, if a group in the bipartite network contains four members, then in the projection each of those four is connected to each of the others by virtue of common membership in the group. (Such a clique of four nodes is visible in the center of the lower projection in Fig. 6.6.) Thus, a one-mode projection is, generically, a union of a number of cliques, one for each group in the original bipartite network.
Projections are useful and widely employed, but their con- struction discards a lot of the information present in the orig- inal bipartite network and hence they are, in a sense, a less powerful representation of our data. For example, a projec- tion loses any information about how many groups two nodes share in common. In the case of the actors and films, for in- stance, there are some pairs of actors who have appeared in many films together—Fred Astaire and Ginger Rogers, say, or William Shatner and Leonard Nimoy—and it’s reasonable to suppose this indicates a stronger connection than between actors who appeared together only once.
We can add information of this kind to our projection by making the projec- tion weighted, giving each edge between two nodes in the projected network a weight equal to the number of common groups the nodes share. This weighted network still does not capture all the information in the bipartite original—it doesn’t record the total number of groups or the exact membership of each group for instance—but it is an improvement on the unweighted version and is quite widely used.
Mathematically, a one-mode projection can be written in terms of the inci- dence matrixBof the original bipartite network as follows. The productBkiBk j will be 1 if and only ifiand jboth belong to the same groupkin the bipartite network. Thus, the total numberPi jof groups to which bothiandjbelong is
Pi j
1
Õ
k1
BkiBk j
1
Õ
k1
BTikBk j, (6.10) where BTik is an element of the transpose BT of the incidence matrix. Equa- tion (6.10) can be written in matrix notation asPBTB, and then×nmatrixP plays a role similar to an adjacency matrix for the weighted one-mode projec- tion onto thennodes. Its off-diagonal elements are equal to the weights in that network, the number of common groups shared by each node pair. Pis not quite an adjacency matrix, however, since its diagonal elements are non-zero, even though the one-mode network itself, by definition, has no self-edges. The diagonal elements have values
Pii
1
Õ
k1
Bki2
1
Õ
k1
Bki, (6.11)
where we have made use of the fact that Bki only takes the values 0 and 1, so thatB2ki Bki. ThusPii is equal to the number of groups to which nodei belongs.
To derive the adjacency matrix of the weighted one-mode projection, there- fore, we would calculate the matrixP BTBand set the diagonal elements equal to zero. To derive the adjacency matrix of the unweighted projection, we would take the weighted matrix and replace every non-zero matrix element with a 1.
By a similar derivation, it is straightforward to show that the other one-mode projection, onto the groups, is represented by a1×1matrixP0BBT, whose off- diagonal elementP0i jgives the number of common members of groupsiand j, and whose diagonal elementPii0 gives the number of members of groupi.