-
Notifications
You must be signed in to change notification settings - Fork 0
/
node_importance.asv
41 lines (38 loc) · 1.25 KB
/
node_importance.asv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
%{
figure
p = plot(G,'Layout','force','EdgeAlpha',0.005,'NodeColor','r');
G = graph(A,order);
deg_ranks = centrality(G,'degree','Importance',G.Edges.Weight);
edges = linspace(min(deg_ranks),max(deg_ranks),15);
bins = discretize(deg_ranks,edges);
p.MarkerSize = bins;
title("Node Importance for Backward Gap")
%}
figure
p = plot(G,'Layout','force','EdgeAlpha',0.005,'NodeColor','r');
G = graph(A,order);
deg_ranks = centrality(G,'degree','Importance',G.Edges.Weight);
edges = linspace(min(deg_ranks),max(deg_ranks),15);
bins = discretize(deg_ranks,edges);
p.MarkerSize = bins;
title("Node Importance for Forward Gap")
%{
figure
p = plot(G,'Layout','force','EdgeAlpha',0.005,'NodeColor','r');
G = digraph(A, order);
deg_ranks = centrality(G,'outdegree','Importance',G.Edges.Weight);
edges = linspace(min(deg_ranks),max(deg_ranks),15);
bins = discretize(deg_ranks,edges);
p.MarkerSize = bins;
title("Out Degree Node Importance for Backward Chem")
%}
%{
figure
p = plot(G,'Layout','force','EdgeAlpha',0.005,'NodeColor','r');
G = digraph(A, order);
deg_ranks = centrality(G,'outdegree','Importance',G.Edges.Weight);
edges = linspace(min(deg_ranks),max(deg_ranks),15);
bins = discretize(deg_ranks,edges);
p.MarkerSize = bins;
title("Out Degree Node Importance for Forward Chem")
%}