[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Brenn Poppe
Subject: Re: [igraph] Interpretation of edge weights in the calculation of weighted diameter and weighted betweenness
Date: Tue, 15 Oct 2019 14:10:11 +0000

Hi Serafim,

Thank you for this tip!

This is indeed what I was thinking about doing.


Van: igraph-help <igraph-help-bounces+brenn.poppe=address@hidden> namens serafim loukas <address@hidden>
Verzonden: dinsdag 15 oktober 2019 7:59
Aan: Help for igraph users <address@hidden>
Onderwerp: Re: [igraph] Interpretation of edge weights in the calculation of weighted diameter and weighted betweenness
Hi there,

Since the higher the value on the edge, the higher the interaction, you can invert the edge weights before applying any function that uses shortest paths (e.g efficiency, shortest path length).

The reason is that in graph theory the lower the shortest path (cost) from node i to j  the higher the efficiency to go from i to j.

So by inverting the values, you will “force” these functions to look at the right direction. 

Hope this helps,

On Oct 14, 2019, at 22:06, Brenn Poppe <address@hidden> wrote:

Hi Szabolcs,

Thank you very much for the answers and the clarification!

Due to time limitations and the upcoming deadlines of my thesis I won't be able
to dig much deeper into the matter on how I should eventually properly transform
my edge weights into distances, so that the meaning of diameter and betweenness would make sense.

I will however definitely discuss this issue with my thesis supervisor.

I definitely understand that the meaning and usefullness of diameter and betweenness indeed strongly depend on the context
of how the networks are constructed

Some clarification on the background of my networks:
My networks are actually based on registration data of birds visiting garden feeders. Here we assume that birds that visit a feeder
together (at the same time) have a social connection. The more co-occurences between both birds, the more strongly they are socially

My 'raw' adjacency matrices have as values these numbers of co-occurrences (as you say: the number of interactions) between each pair of birds. However for constructing my networks I do not use these absolute values (nr. of occurrences) as edge weights but a standardized value. This standardized value is actually the number of co-occurences 2 birds have divided by the sum of all co-occurrences both of these 2 birds had with other birds (including with each other) during that day. It is these standardized values that I use as interaction strengths (strength of connection) and thus as edge weights.

Thanks again.


Van: igraph-help <igraph-help-bounces+brenn.poppe=address@hidden> namens Szabolcs Horvát <address@hidden>
Verzonden: maandag 14 oktober 2019 18:14
Aan: Help for igraph users <address@hidden>
Onderwerp: Re: [igraph] Interpretation of edge weights in the calculation of weighted diameter and weighted betweenness
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.
> Thanks in advance,
> Brenn Poppe
> Masterstudent MSc in Biology (University of Ghent)
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help

igraph-help mailing list
igraph-help mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]