Degree and influence of line of a node in network

7 visualizaciones (últimos 30 días)
Deepthi B
Deepthi B el 3 de Jun. de 2021
Comentada: Deepthi B el 4 de Jun. de 2021
Is there any code or toolbox available in matalb for finding out the degree and influence of line (DIL) of a node in network?

Respuesta aceptada

Christine Tobler
Christine Tobler el 3 de Jun. de 2021
The only reference for DIL I could find is a 2016 paper: Evaluating the importance of nodes in complex networks, J Liu, Q Xiong, W Shi, X Shi, K Wang. Is this what you are looking for? There is no way to directly compute the measure defined in that paper in MATLAB, but the formulas for computing it seem relatively straightforward.
One value that the paper requires is the number of triangles containing any edge of the graph. Here is how you can compute this number for all edges in a graph G:
% Make an example graph
rng default; G = graph(sprandn(10, 10, 0.4), 'upper');
% Find source and target nodes for each edge in the graph
[s, t] = findedge(G);
% Adjacency matrix, A(i, j) is 1 if there is an edge (i, j), 0 otherwise
A = adjacency(G);
% For each edge, count number of common neighbors for nodes s and t
nrTriangles = full(sum(A(:, s) .* A(:, t)))';
% Display each edge on one row, giving source node, target node, and number
% of triangles this edge is part of.
[s t nrTriangles]
ans = 14×3
1 3 1 1 5 2 1 10 1 2 3 1 2 5 1 2 8 0 3 5 2 3 9 0 5 10 1 6 7 0
% Plot the graph for comparison.
plot(G)
Given this and the degree and neighbors methods, you should be able to compute the values defined in the paper above.
  2 comentarios
Rayan Glus
Rayan Glus el 3 de Jun. de 2021
You are the best. Thanks.
Deepthi B
Deepthi B el 4 de Jun. de 2021
Thanks, Christine, but I tried to code it yesterday and it works. Anyway, thank you so much for your valuable help.

Iniciar sesión para comentar.

Más respuestas (1)

Rayan Glus
Rayan Glus el 3 de Jun. de 2021
D = degree(G, node)
  3 comentarios
Rayan Glus
Rayan Glus el 3 de Jun. de 2021
Oh I see. I'm sorry for the misleading information.
Deepthi B
Deepthi B el 4 de Jun. de 2021
It's Okay

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by