New Feature: Laplacian Centrality
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia con l’articolo di Qi et al. del 2012 e con l’implementazione collegata della centralità laplaciana di NetworkX, quindi esamina l’API di centralità esistente di Graphs.jl e la copertura dei test per i grafi pesati. Il lavoro sarà considerato completato quando saranno disponibili un design di implementazione concordato e test che coprano la misura di centralità laplaciana proposta sui tipi di grafo pertinenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hello there,
I am opening this issue to discuss the possibility of implementing a new centrality measure called Laplacian Centrality. I found it very interesting and would have liked to know if it would have its place in the Graphs.jl project.
Description
This metric is presented by (Qi et al. 2012) for having two major benefits over classic centrality measures (e.g. degree, betweenness):
- It is naturally suited for weighted graphs.
- It resorts to an intermediate between global (like betweenness centrality) and local (like degree centrality) scope to characterize a vertex.
It is based on the Laplacian Energy of a graph $G$ measured by:
$$E(G) = \sum_{i=1}^{n} \lambda_i^2$$
with $\lambda_i$ the $i^{th}$ eigenvalue of $G$.
The formula for the centrality of a given vertex is given by the drop of energy when removing this vertex from the graph:
$$C_L(v_i, G) = \frac{E_L(G) - E_L(G_i)}{E_L(G)}$$
with $G_i$ the graph obtained from removing vertex $v_i$ from G.
Implementation
Although not providing any pseudo code, (Qi et al. 2012) describes a way to compute this measure efficiently, with a complexity of $O(n\Delta^2)$ with $\Delta$ being the largest degree in the graph at hand.
The formula goes like this:
$$E_L(G) - E_L(G_i) = 2.NW^E_2(v_i) + 2.NW^M_2(v_i) + 4.NW^C_2(v_i)$$
with $NW^E_2(v_i)$ the number of 2-walks ending or starting with $v_i$, $NW^M_2(v_i)$ the number of 2-walks having $v_i$ as middle vertex and $NW^C_2(v_i)$ the number of closed 2-walks including $v_i$.
Each of them can be described as sums and multiplications of edge weights.
NetworkX implementation
A current implementation of that algorithm exists in Python's NetworkX package. However, it recomputes eigenvalues for each subgraph, leading to a simpler but potentially suboptimal algorithm according to (Qi et al. 2012).
Question about unit testing
I seemed to realize that the Graphs.jl library did not test its centrality measures using weighted graphs the likes of SimpleWeightedGraphs. If this algorithm is implemented, would it be suitable to test for these graphs here as well? (the only case of weighted graph test I found was for betweenness_centrality using an external distance matrix).
Would the implementation of such a metric be of interest to the project?
Thanks for reading me!
- Lingua principale
- Julia
- Stelle
- 539
- Fork
- 130
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di JuliaGraphs/Graphs.jl
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
JuliaGraphs/Graphs.jl#521 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 42/100
JuliaGraphs/Graphs.jl#504 · 4 commenti ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 55/100
JuliaGraphs/Graphs.jl#498 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
JuliaGraphs/Graphs.jl#497 · 1 commento ·
-
good first issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
JuliaGraphs/Graphs.jl#483 · 3 commenti ·
Tutte le issue di JuliaGraphs/Graphs.jl
Issue simili
-
TSDAE's docstring implies a theta argument it does not takeForse già presa @singhharsh1708 l’ha presa oggi. Apertadocumentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 74/100
SciML/PETScDiffEq.jl#282 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue help wanted
Difficoltà 2/5 Mezza giornata Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
SciML/SciMLBase.jl#1643 ·
I maintainer di solito rispondono entro 2 giorni
-
authority-vechtstromen ready-for-agent
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
Deltares/Ribasim-NL#890 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno