This method is similar to Kleinberg centrality. Like Kleinberg centrality, offense-defense method assigns to each node two scores: an offensive rating and a defensive rating. Unlike Kleinberg measure, in offense-defense method the relationships between the two scores is non-linear. The offense-defense power thesis reads:
A node has high offensive rating if it is linked to by nodes with low defensive rating; a node has high defensive rating if it links to nodes with low offensive rating.
The method is described in Amy N. Langville and Carl D. Meyer's book Who's #1? (The Science of Rating and Ranking). In the book the method is applied to the problem of rating and ranking of sport teams; however, it can be tailored for different contexts, for instance financial networks in which offense is credit and defense is debit. In this section we follow the convenient presentation of the book of Langville and Meyer. In sport, the offensive strength of team A during a match with team B is a relative concept since it depends on the defensive prowess of team B: winning against a team with a strong defense significantly increases the offensive power of the winner; similarly, the defensive power of team A is relative to the offensive skill of team B: losing against a team with a weak offense significantly deflates the defensive power of the loser.
Let be the adjacency matrix of a weighted directed graph. We interpret as the score that team generated against team (average the results if the teams met more than once). Set if the two teams did not play each other. Notice that reflects both offensive and defensive strength: it is the number of points that scores to (an offensive indicator) as well as the number of points that held to (a defensive indicator).
Offensive rating of team is given by:
Let be the vector whose elements are the reciprocals of the elements of . In matrix form we have:
Notice that in the offense-defense power the relationships between the two measures is non-linear, while in Kleinberg centrality this relationships is linear. Hence, offense-defense method can be regarded as a non-linear (reciprocal) version of Kleinberg method.
A single offense-defense rating for a team can be obtained by combining the offense and defense ratings as follows:
Offense and defense ratings can be computed with the following iterative process. Let , where is the vector of all 1's. For :
By Sinkhorn-Knopp theorem, the offensive and defensive powers exist, and the corresponding iterative method converges, if and only if the corresponding graph is regularizable. What about the offense defense method on graphs that are not regularizable? A solution is recaptured using a perturbed matrix
The following user-defined function od computes offense and defense ratings using a direct computation:
# Compute offense x = (1/y) A and defense y = A (1/x)
#INPUT
# A = graph adjacency matrix
# t = precision
# OUTPUT
# A list with:
# x = offense vector
# y = defense vector
# iter = number of iterations
od = function(A, t) {
n = dim(A)[1];
y0 = rep(1, n);
diff = 1
eps = 1/10^t;
iter = 0;
while (diff > eps) {
x1 = (1/y0) %*% A;
y1 = (1/x1) %*% t(A);
diff = sum(abs(y1 - y0));
y0 = y1;
iter = iter + 1;
}
return(list(o = as.vector(x1), d = as.vector(y1), iter = iter))
}
A directed graph with nodes labelled with the following ratings from top to bottom: offensive, defensive, and aggregated. The graph is not regularizable, hence the full perturbation has been used. Notice how the two central nodes have both large offensive power, but only one has also a large defensive power (a small defensive rating): this is the node with the largest aggregated offense-defense power.