igraph-help
[Top][All Lists]

## Re: [igraph] Interpretation of edge weights in the calculation of weight

 From: Szabolcs Horvát Subject: Re: [igraph] Interpretation of edge weights in the calculation of weighted diameter and weighted betweenness Date: Mon, 14 Oct 2019 18:14:41 +0200

```Hello Brenn,

All functions in igraph which are based on the concept of paths /
paths lengths / shortest paths interpret weights as distances. The
length of a path is the sum of the edge weights along the path.

On Mon, 14 Oct 2019 at 17:57, Brenn Poppe <address@hidden> wrote:
>
> Dear all,
>
> For my masterthesis I'm constructing and analyzing animal social networks. In
> these networks individual Great Tits (Parus major) and Blue Tits (Cyanistes
> caeruleus) are represented by nodes. I construct a set of daily networks that
> are undirected and weighted starting from adjacency matrices. The values in
> these adjacency matrices are used as the edge weights of the links between
> nodes in my graphs. These values represent an interaction strength: the more
> 2 individuals interacted (co-occurring on garden feeders) the higher their
> interaction strength and the higher the edge weight between these individuals
> in the graph.
>
> I use igraph in R to construct and analyse these daily networks.
>
> Now for each of these daily networks I calculate (among others) 2 metrics
> namely: the diameter (graph-level) and the betweenness centrality
> (node-level). Because I have weighted networks I also use the weights when
> implementing these functions.
>
> Now based on my interpretation of the edge weights, being interaction
> strengths, I would expect the diameter to be the path that has the lowest sum
> of edge weights and thus a path along which all interactions are weak.

That is not how "diameter" is defined in graph theory. The diameter is
the length of the longest shortest-path.

Of course we can talk about the shortest shortest path too, regardless
of what we call it. However, you may not find that to be a useful
concept. THe shortest shortest path consists of the edge with the
smallest weight.

> Assuming that for example information travels slower along a path with weak
> connections opposed to a path with strong connections. However I have noticed
> that the calculated diameter actually gives the 'opposite' result being the
> path with the highest sum of edge weights and thus a path with overall strong
> connections. This is a path that I would consider to be the shortest rather
> than the longest. In some occassions the diameter is exactly the same as the
> highest edge weight in a network. It looks as if the edge weights are
> interpreted as costs/distances/resistance.
>
> Because of this 'problem' with the calculation of diameter according to my
> interpretation I also have similar concerns about the calculation of weighted
> betweenness. I have seen this issue (a confusing interpretation of edge
> weights by igraph) pop up several times on this mailing list.
>
> Although this issue has popped up several times, I have not found a clear
> solution in the answers as to what I should do with my data or my script to
> get diameter and betweenness to be interpretable according to my
> interpretation of the edge weights:

This is because there is no general solution to this problem.
Betweenness centrality is just one of many graph metrics that can
characterize each vertex (or each edge) in a graph. It is a useful
concept for some applications, but not for others.  It is up to you to
decide whether betweenness carries anything meaningful in your
network. It is true that the interpretation is not trivial,
and—sadly—not very well-founded in many published papers. Many people
will simply transform the weights with a monotonically decreasing
functions (e.g. taking the inverse), then compute the betweenness with
these new weights. Does this make any sense? In my opinion, this is
often debatable. The results you get will depend on the specific
monotonic transformation you chose. In some applications, such as when
agents are moving along the shortest paths in the network (think e.g.
travelling on roads), betweenness can be connected to an actual
physical process happening on the network. In a social network where
people pass information to each other, there is again a way to connect
it to something physical (sociological?) Is there anything tangible
(ethological?) you can connect it to? I don't know.

It is good to note that if the "strength of connection" in your
network represents the number of interactions between the bird, then
you can also use a multigraph. The number of edges is the number of
interactions. The betweenness computed in this network is yet another
different thing.

>
> Do I have to use a different function or do I have to specify certain
> arguments in the functions diameter() and betweenness()
> Or can I simple take the inverse (1/edge weight) of the edge weights before
> calling the specified functions?
> Or.....
>
> Note: all the edge weights range between 0 and 1.
>
>
> Brenn Poppe
> Masterstudent MSc in Biology (University of Ghent)
>
> _______________________________________________
> igraph-help mailing list