필터 지우기
필터 지우기

The "cost" used in the betweenness centrality calculation

조회 수: 5 (최근 30일)
Jun Wang
Jun Wang 2016년 7월 7일
댓글: Christine Tobler 2022년 6월 28일
For weighted networks, in the command "centrality(G,'betweenness','Cost',G.Edges.Weight)", betweenness means shortest paths between other nodes that pass through node i, so when finding out the shortest path, I think the Dijkstra’s algorithm is adopted. So my question is: the weights of links are directly used in the Dijkstra’s algorithm as "cost" or the weights are reversed firstly and then used for finding the shortest path. In summary, what I am asking is the "cost" used in the "centrality(G,'betweenness','Cost',G.Edges.Weight)" is the weights directly or reversed, i.e., higher weight is (1) higher cost and longer distance or (2) lower cost and shorter distance. I appreciate anyone's help regarding this question. Thank you very much.

답변 (1개)

Paras Gupta
Paras Gupta 2022년 6월 28일
Hi,
It is my understanding that you want to know whether weights are inversed or not when using the ‘betweenness centrality’ measure function in MATLAB. The short answer is ‘NO, the weights are not inversed’.
For measures like the ‘betweenness centrality’, the higher the total edge weight is between any two given nodes, the greater would be the 'cost' between them (or a larger distance between the two nodes). This generally works for cases when the edge weights themselves represent the farness between the edge nodes.
centrality(G,'betweenness','Cost',1./(G.Edges.Weight));
In case the edge weights in your network represent some form of importance between the edge nodes, you can inverse the weights using the element-wise division operation before using the 'betweenness centrality' function (scaling the inversed weights can also be done if required).
You can refer to the documentation of centrality measure functions for more information on the interpretation of the 'cost' argument.
Hope this helps!
  댓글 수: 1
Christine Tobler
Christine Tobler 2022년 6월 28일
Yes, the weights are not used by default in the centrality function, while they are used for example in shortestpath. There's an example in the doc related to betweenness centrality which shows this: Closeness and Betweenness of Minnesota Roads
The reason is just as Paras explained, since centrality measures have two different notions of edge weights, we have these be specified explicitly through the "Cost" or "Importance" flag, depending which notion of edge weight each centrality measure uses. That way, it's explicit whether a larger weight means a larger distance between nodes, or a larger importance of the connection between two nodes.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by