Skip to content

Commit 2070416

Browse files
Merge pull request #169 from tigergraph/GML-1869-pagerank
Gml 1869 pagerank
2 parents 80ffe0f + 0c4f35f commit 2070416

19 files changed

+100
-176
lines changed

Diff for: algorithms/Centrality/pagerank/global/unweighted/tg_pagerank.gsql

+34-22
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
CREATE QUERY tg_pagerank (STRING v_type, STRING e_type, FLOAT max_change=0.001, INT maximum_iteration=25, FLOAT damping=0.85, INT top_k = 100, BOOL print_results = TRUE, STRING result_attribute = "", STRING file_path = "", BOOL display_edges = FALSE) SYNTAX V1 {
1+
CREATE QUERY tg_pagerank (STRING v_type, STRING e_type, FLOAT max_change=0.001, INT maximum_iteration=25, FLOAT damping=0.85, INT top_k = 100, BOOL normalize=TRUE, BOOL print_results = TRUE, STRING result_attribute = "", STRING file_path = "", BOOL display_edges = FALSE) SYNTAX V1 {
22
/*
3-
First Author: unk
4-
First Commit Date: unk
3+
First Author: <unk>
4+
First Commit Date: <unk>
55

66
Recent Author: Rob Rossmiller
7-
Recent Commit Date: Rob Rossmiller
7+
Recent Commit Date: Sept 4, 2024
88

99

1010
Repository:
@@ -41,7 +41,7 @@ CREATE QUERY tg_pagerank (STRING v_type, STRING e_type, FLOAT max_change=0.001,
4141
file_path:
4242
file to write CSV output to
4343
top_k:
44-
#top scores to output
44+
//top scores to output
4545
display_edges:
4646
output edges for visualization
4747
max_change:
@@ -52,54 +52,66 @@ CREATE QUERY tg_pagerank (STRING v_type, STRING e_type, FLOAT max_change=0.001,
5252

5353
TYPEDEF TUPLE<VERTEX Vertex_ID, FLOAT score> Vertex_Score;
5454
HeapAccum<Vertex_Score>(top_k, score DESC) @@top_scores_heap;
55-
SetAccum<VERTEX> @@top_vertices; # vertices with top score
56-
MaxAccum<FLOAT> @@max_diff = 9999; # max score change in an iteration
57-
SumAccum<FLOAT> @sum_recvd_score = 0; # sum of scores each vertex receives FROM neighbors
58-
SumAccum<FLOAT> @sum_score = 1; # initial score for every vertex is 1.
59-
SetAccum<EDGE> @@edge_set; # list of all edges, if display is needed
55+
SetAccum<VERTEX> @@top_vertices; // vertices with top score
56+
MaxAccum<FLOAT> @@max_diff = 9999; // max score change in an iteration
57+
SumAccum<FLOAT> @sum_recvd_score = 0; // sum of scores each vertex receives FROM neighbors
58+
SumAccum<FLOAT> @sum_score = 1; // initial score for every vertex is 1.
59+
SetAccum<EDGE> @@edge_set; // list of all edges, if display is needed
6060
FILE f (file_path);
61+
INT N=1;
62+
63+
64+
// PageRank iterations
65+
Start = {v_type}; // Start with all vertices of specified type(s)
66+
IF normalize THEN
67+
N = Start.size();
68+
tmp = SELECT s FROM Start:s
69+
ACCUM s.@sum_score = 1.0/N;
70+
END;
6171

62-
# PageRank iterations
63-
Start = {v_type}; # Start with all vertices of specified type(s)
6472
WHILE @@max_diff > max_change LIMIT maximum_iteration DO
6573
@@max_diff = 0;
74+
6675
V = SELECT s FROM Start:s -(e_type:e)- v_type:t
67-
ACCUM
68-
t.@sum_recvd_score += s.@sum_score/(s.outdegree(e_type))
76+
ACCUM t.@sum_recvd_score += s.@sum_score/(s.outdegree(e_type))
6977
POST-ACCUM
70-
s.@sum_score = (1.0 - damping) + damping * s.@sum_recvd_score,
78+
s.@sum_score = (1.0-damping)/N + damping * s.@sum_recvd_score,
7179
s.@sum_recvd_score = 0,
7280
@@max_diff += abs(s.@sum_score - s.@sum_score');
73-
END; # END WHILE loop
81+
END;
7482

75-
# Output
83+
// Output
7684
IF file_path != "" THEN
7785
f.println("Vertex_ID", "PageRank");
7886
END;
87+
7988
V = SELECT s FROM Start:s
80-
POST-ACCUM
89+
POST-ACCUM
8190
IF result_attribute != "" THEN
8291
s.setAttr(result_attribute, s.@sum_score)
8392
END,
93+
8494
IF file_path != "" THEN
8595
f.println(s, s.@sum_score)
8696
END,
87-
97+
8898
IF print_results THEN
8999
@@top_scores_heap += Vertex_Score(s, s.@sum_score)
90100
END;
91101

92102
IF print_results THEN
93103
PRINT @@top_scores_heap;
94104
IF display_edges THEN
105+
95106
FOREACH vert IN @@top_scores_heap DO
96107
@@top_vertices += vert.Vertex_ID;
97108
END;
98109

99110
Top = {@@top_vertices};
100-
Top = SELECT s FROM Top:s -(e_type:e)- v_type:t
101-
WHERE @@top_vertices.contains(t)
102-
ACCUM @@edge_set += e;
111+
Top = SELECT s
112+
FROM Top:s -(e_type:e)- v_type:t
113+
WHERE @@top_vertices.contains(t)
114+
ACCUM @@edge_set += e;
103115

104116
PRINT @@edge_set;
105117
PRINT Top;

Diff for: tests/data/baseline/centrality/pagerank/Empty.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"@@top_scores_heap": [{"Vertex_ID": "P", "score": 0}, {"Vertex_ID": "N", "score": 0}, {"Vertex_ID": "F", "score": 0}, {"Vertex_ID": "C", "score": 0}, {"Vertex_ID": "J", "score": 0}, {"Vertex_ID": "R", "score": 0}, {"Vertex_ID": "A", "score": 0}, {"Vertex_ID": "T", "score": 0}, {"Vertex_ID": "D", "score": 0}, {"Vertex_ID": "E", "score": 0}, {"Vertex_ID": "L", "score": 0}, {"Vertex_ID": "S", "score": 0}, {"Vertex_ID": "I", "score": 0}, {"Vertex_ID": "H", "score": 0}, {"Vertex_ID": "G", "score": 0}, {"Vertex_ID": "B", "score": 0}, {"Vertex_ID": "Q", "score": 0}, {"Vertex_ID": "O", "score": 0}, {"Vertex_ID": "K", "score": 0}, {"Vertex_ID": "M", "score": 0}]}]
1+
[{"@@top_scores_heap": [{"Vertex_ID": "B", "score": 1}, {"Vertex_ID": "H", "score": 1}, {"Vertex_ID": "I", "score": 1}, {"Vertex_ID": "S", "score": 1}, {"Vertex_ID": "Q", "score": 1}, {"Vertex_ID": "F", "score": 1}, {"Vertex_ID": "J", "score": 1}, {"Vertex_ID": "D", "score": 1}, {"Vertex_ID": "E", "score": 1}, {"Vertex_ID": "P", "score": 1}, {"Vertex_ID": "M", "score": 1}, {"Vertex_ID": "R", "score": 1}, {"Vertex_ID": "N", "score": 1}, {"Vertex_ID": "K", "score": 1}, {"Vertex_ID": "O", "score": 1}, {"Vertex_ID": "C", "score": 1}, {"Vertex_ID": "A", "score": 1}, {"Vertex_ID": "L", "score": 1}, {"Vertex_ID": "G", "score": 1}, {"Vertex_ID": "T", "score": 1}]}]
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"@@top_scores_heap": [{"Vertex_ID": "A", "score": 0.463517542849035}, {"Vertex_ID": "B", "score": 0.02823591879741922}, {"Vertex_ID": "C", "score": 0.02823591879741922}, {"Vertex_ID": "D", "score": 0.02823591879741922}, {"Vertex_ID": "E", "score": 0.02823591879741922}, {"Vertex_ID": "F", "score": 0.02823591879741922}, {"Vertex_ID": "G", "score": 0.02823591879741922}, {"Vertex_ID": "H", "score": 0.02823591879741922}, {"Vertex_ID": "I", "score": 0.02823591879741922}, {"Vertex_ID": "J", "score": 0.02823591879741922}, {"Vertex_ID": "K", "score": 0.02823591879741922}, {"Vertex_ID": "L", "score": 0.02823591879741922}, {"Vertex_ID": "M", "score": 0.02823591879741922}, {"Vertex_ID": "N", "score": 0.02823591879741922}, {"Vertex_ID": "O", "score": 0.02823591879741922}, {"Vertex_ID": "P", "score": 0.02823591879741922}, {"Vertex_ID": "Q", "score": 0.02823591879741922}, {"Vertex_ID": "R", "score": 0.02823591879741922}, {"Vertex_ID": "S", "score": 0.02823591879741922}, {"Vertex_ID": "T", "score": 0.02823591879741922}]}]
1+
[{"@@top_scores_heap": [{"Vertex_ID": "A", "score": 7.642066}, {"Vertex_ID": "I", "score": 0.6504175}, {"Vertex_ID": "C", "score": 0.6504175}, {"Vertex_ID": "T", "score": 0.6504175}, {"Vertex_ID": "Q", "score": 0.6504175}, {"Vertex_ID": "L", "score": 0.6504175}, {"Vertex_ID": "B", "score": 0.6504175}, {"Vertex_ID": "M", "score": 0.6504175}, {"Vertex_ID": "K", "score": 0.6504175}, {"Vertex_ID": "N", "score": 0.6504175}, {"Vertex_ID": "F", "score": 0.6504175}, {"Vertex_ID": "R", "score": 0.6504175}, {"Vertex_ID": "H", "score": 0.6504175}, {"Vertex_ID": "S", "score": 0.6504175}, {"Vertex_ID": "D", "score": 0.6504175}, {"Vertex_ID": "E", "score": 0.6504175}, {"Vertex_ID": "G", "score": 0.6504175}, {"Vertex_ID": "J", "score": 0.6504175}, {"Vertex_ID": "O", "score": 0.6504175}, {"Vertex_ID": "P", "score": 0.6504175}]}]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"@@top_scores_heap": [{"Vertex_ID": "A", "score": 0.04796147421875003}, {"Vertex_ID": "B", "score": 0.050107290830592136}, {"Vertex_ID": "C", "score": 0.050107290830592136}, {"Vertex_ID": "D", "score": 0.050107290830592136}, {"Vertex_ID": "E", "score": 0.050107290830592136}, {"Vertex_ID": "F", "score": 0.050107290830592136}, {"Vertex_ID": "G", "score": 0.050107290830592136}, {"Vertex_ID": "H", "score": 0.050107290830592136}, {"Vertex_ID": "I", "score": 0.050107290830592136}, {"Vertex_ID": "J", "score": 0.050107290830592136}, {"Vertex_ID": "K", "score": 0.050107290830592136}, {"Vertex_ID": "L", "score": 0.050107290830592136}, {"Vertex_ID": "M", "score": 0.050107290830592136}, {"Vertex_ID": "N", "score": 0.050107290830592136}, {"Vertex_ID": "O", "score": 0.050107290830592136}, {"Vertex_ID": "P", "score": 0.050107290830592136}, {"Vertex_ID": "Q", "score": 0.050107290830592136}, {"Vertex_ID": "R", "score": 0.050107290830592136}, {"Vertex_ID": "S", "score": 0.050107290830592136}, {"Vertex_ID": "T", "score": 0.050107290830592136}]}]
1+
[{"@@top_scores_heap": [{"Vertex_ID": "B", "score": 1}, {"Vertex_ID": "N", "score": 1}, {"Vertex_ID": "P", "score": 1}, {"Vertex_ID": "T", "score": 1}, {"Vertex_ID": "H", "score": 1}, {"Vertex_ID": "S", "score": 1}, {"Vertex_ID": "Q", "score": 1}, {"Vertex_ID": "L", "score": 1}, {"Vertex_ID": "D", "score": 1}, {"Vertex_ID": "E", "score": 1}, {"Vertex_ID": "I", "score": 1}, {"Vertex_ID": "G", "score": 1}, {"Vertex_ID": "O", "score": 1}, {"Vertex_ID": "C", "score": 1}, {"Vertex_ID": "F", "score": 1}, {"Vertex_ID": "J", "score": 1}, {"Vertex_ID": "R", "score": 1}, {"Vertex_ID": "K", "score": 1}, {"Vertex_ID": "M", "score": 1}, {"Vertex_ID": "A", "score": 0.15}]}]

Diff for: tests/data/baseline/centrality/pagerank/Line.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"@@top_scores_heap": [{"Vertex_ID": "A", "score": 0.03211926639226151}, {"Vertex_ID": "B", "score": 0.057926119511365004}, {"Vertex_ID": "C", "score": 0.05441422855961764}, {"Vertex_ID": "D", "score": 0.05245734353657548}, {"Vertex_ID": "E", "score": 0.05137048851726371}, {"Vertex_ID": "F", "score": 0.050764880552029296}, {"Vertex_ID": "G", "score": 0.05043133169155993}, {"Vertex_ID": "H", "score": 0.050248328845906194}, {"Vertex_ID": "I", "score": 0.05015421972563542}, {"Vertex_ID": "J", "score": 0.05011379266778576}, {"Vertex_ID": "K", "score": 0.05011379266778576}, {"Vertex_ID": "L", "score": 0.05015421972563542}, {"Vertex_ID": "M", "score": 0.050248328845906194}, {"Vertex_ID": "N", "score": 0.05043133169155993}, {"Vertex_ID": "O", "score": 0.050764880552029296}, {"Vertex_ID": "P", "score": 0.05137048851726371}, {"Vertex_ID": "Q", "score": 0.05245734353657548}, {"Vertex_ID": "R", "score": 0.05441422855961764}, {"Vertex_ID": "S", "score": 0.057926119511365004}, {"Vertex_ID": "T", "score": 0.03211926639226151}]}]
1+
[{"@@top_scores_heap": [{"Vertex_ID": "S", "score": 1.140792}, {"Vertex_ID": "B", "score": 1.140792}, {"Vertex_ID": "C", "score": 1.109244}, {"Vertex_ID": "R", "score": 1.109244}, {"Vertex_ID": "E", "score": 1.037739}, {"Vertex_ID": "P", "score": 1.037739}, {"Vertex_ID": "Q", "score": 1.035503}, {"Vertex_ID": "D", "score": 1.035503}, {"Vertex_ID": "N", "score": 1.010813}, {"Vertex_ID": "G", "score": 1.010813}, {"Vertex_ID": "F", "score": 1.007152}, {"Vertex_ID": "O", "score": 1.007152}, {"Vertex_ID": "I", "score": 1.002082}, {"Vertex_ID": "L", "score": 1.002082}, {"Vertex_ID": "H", "score": 1.000986}, {"Vertex_ID": "M", "score": 1.000986}, {"Vertex_ID": "J", "score": 1.00026}, {"Vertex_ID": "K", "score": 1.00026}, {"Vertex_ID": "T", "score": 0.6554276}, {"Vertex_ID": "A", "score": 0.6554276}]}]
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"@@top_scores_heap": [{"Vertex_ID": "A", "score": 0.010307351836075132}, {"Vertex_ID": "B", "score": 0.019068653273054674}, {"Vertex_ID": "C", "score": 0.026515787505709494}, {"Vertex_ID": "D", "score": 0.03284585745131274}, {"Vertex_ID": "E", "score": 0.03822640263682678}, {"Vertex_ID": "F", "score": 0.0427998335627278}, {"Vertex_ID": "G", "score": 0.046687200921397436}, {"Vertex_ID": "H", "score": 0.049991399441354015}, {"Vertex_ID": "I", "score": 0.05279989116293594}, {"Vertex_ID": "J", "score": 0.055187020230237145}, {"Vertex_ID": "K", "score": 0.05721598047140236}, {"Vertex_ID": "L", "score": 0.05894048784859933}, {"Vertex_ID": "M", "score": 0.0604062020468127}, {"Vertex_ID": "N", "score": 0.0616519348302555}, {"Vertex_ID": "O", "score": 0.06271067715089663}, {"Vertex_ID": "P", "score": 0.06361047219594917}, {"Vertex_ID": "Q", "score": 0.06437515748315642}, {"Vertex_ID": "R", "score": 0.06502499564640625}, {"Vertex_ID": "S", "score": 0.06558121834760403}, {"Vertex_ID": "T", "score": 0.06605347595728643}]}]
1+
[{"@@top_scores_heap": [{"Vertex_ID": "K", "score": 1}, {"Vertex_ID": "P", "score": 1}, {"Vertex_ID": "S", "score": 1}, {"Vertex_ID": "T", "score": 1}, {"Vertex_ID": "O", "score": 1}, {"Vertex_ID": "R", "score": 1}, {"Vertex_ID": "Q", "score": 1}, {"Vertex_ID": "M", "score": 1}, {"Vertex_ID": "L", "score": 1}, {"Vertex_ID": "N", "score": 1}, {"Vertex_ID": "J", "score": 0.8031256}, {"Vertex_ID": "I", "score": 0.768383}, {"Vertex_ID": "H", "score": 0.7275094}, {"Vertex_ID": "G", "score": 0.6794229}, {"Vertex_ID": "F", "score": 0.6228504}, {"Vertex_ID": "E", "score": 0.5562946}, {"Vertex_ID": "D", "score": 0.4779937}, {"Vertex_ID": "C", "score": 0.385875}, {"Vertex_ID": "B", "score": 0.2775}, {"Vertex_ID": "A", "score": 0.15}]}]

Diff for: tests/data/baseline/centrality/pagerank/Ring.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"@@top_scores_heap": [{"Vertex_ID": "A", "score": 0.05}, {"Vertex_ID": "B", "score": 0.05}, {"Vertex_ID": "C", "score": 0.05}, {"Vertex_ID": "D", "score": 0.05}, {"Vertex_ID": "E", "score": 0.05}, {"Vertex_ID": "F", "score": 0.05}, {"Vertex_ID": "G", "score": 0.05}, {"Vertex_ID": "H", "score": 0.05}, {"Vertex_ID": "I", "score": 0.05}, {"Vertex_ID": "J", "score": 0.05}, {"Vertex_ID": "K", "score": 0.05}, {"Vertex_ID": "L", "score": 0.05}, {"Vertex_ID": "M", "score": 0.05}, {"Vertex_ID": "N", "score": 0.05}, {"Vertex_ID": "O", "score": 0.05}, {"Vertex_ID": "P", "score": 0.05}, {"Vertex_ID": "Q", "score": 0.05}, {"Vertex_ID": "R", "score": 0.05}, {"Vertex_ID": "S", "score": 0.05}, {"Vertex_ID": "T", "score": 0.05}]}]
1+
[{"@@top_scores_heap": [{"Vertex_ID": "F", "score": 1}, {"Vertex_ID": "L", "score": 1}, {"Vertex_ID": "J", "score": 1}, {"Vertex_ID": "K", "score": 1}, {"Vertex_ID": "M", "score": 1}, {"Vertex_ID": "O", "score": 1}, {"Vertex_ID": "C", "score": 1}, {"Vertex_ID": "T", "score": 1}, {"Vertex_ID": "I", "score": 1}, {"Vertex_ID": "P", "score": 1}, {"Vertex_ID": "G", "score": 1}, {"Vertex_ID": "B", "score": 1}, {"Vertex_ID": "D", "score": 1}, {"Vertex_ID": "E", "score": 1}, {"Vertex_ID": "R", "score": 1}, {"Vertex_ID": "A", "score": 1}, {"Vertex_ID": "H", "score": 1}, {"Vertex_ID": "N", "score": 1}, {"Vertex_ID": "S", "score": 1}, {"Vertex_ID": "Q", "score": 1}]}]
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"@@top_scores_heap": [{"Vertex_ID": "A", "score": 0.05}, {"Vertex_ID": "B", "score": 0.05}, {"Vertex_ID": "C", "score": 0.05}, {"Vertex_ID": "D", "score": 0.05}, {"Vertex_ID": "E", "score": 0.05}, {"Vertex_ID": "F", "score": 0.05}, {"Vertex_ID": "G", "score": 0.05}, {"Vertex_ID": "H", "score": 0.05}, {"Vertex_ID": "I", "score": 0.05}, {"Vertex_ID": "J", "score": 0.05}, {"Vertex_ID": "K", "score": 0.05}, {"Vertex_ID": "L", "score": 0.05}, {"Vertex_ID": "M", "score": 0.05}, {"Vertex_ID": "N", "score": 0.05}, {"Vertex_ID": "O", "score": 0.05}, {"Vertex_ID": "P", "score": 0.05}, {"Vertex_ID": "Q", "score": 0.05}, {"Vertex_ID": "R", "score": 0.05}, {"Vertex_ID": "S", "score": 0.05}, {"Vertex_ID": "T", "score": 0.05}]}]
1+
[{"@@top_scores_heap": [{"Vertex_ID": "T", "score": 1}, {"Vertex_ID": "L", "score": 1}, {"Vertex_ID": "S", "score": 1}, {"Vertex_ID": "N", "score": 1}, {"Vertex_ID": "P", "score": 1}, {"Vertex_ID": "K", "score": 1}, {"Vertex_ID": "I", "score": 1}, {"Vertex_ID": "F", "score": 1}, {"Vertex_ID": "J", "score": 1}, {"Vertex_ID": "H", "score": 1}, {"Vertex_ID": "A", "score": 1}, {"Vertex_ID": "G", "score": 1}, {"Vertex_ID": "D", "score": 1}, {"Vertex_ID": "E", "score": 1}, {"Vertex_ID": "O", "score": 1}, {"Vertex_ID": "C", "score": 1}, {"Vertex_ID": "R", "score": 1}, {"Vertex_ID": "M", "score": 1}, {"Vertex_ID": "B", "score": 1}, {"Vertex_ID": "Q", "score": 1}]}]

Diff for: tests/data/baseline/centrality/pagerank/Tree.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"@@top_scores_heap": [{"Vertex_ID": "A", "score": 0.04753738488500107}, {"Vertex_ID": "B", "score": 0.06909959193353464}, {"Vertex_ID": "C", "score": 0.07220759154455524}, {"Vertex_ID": "D", "score": 0.07130204500748627}, {"Vertex_ID": "E", "score": 0.07480080379154676}, {"Vertex_ID": "F", "score": 0.0785393029006319}, {"Vertex_ID": "G", "score": 0.0785393029006319}, {"Vertex_ID": "H", "score": 0.07804404762676867}, {"Vertex_ID": "I", "score": 0.07804404762676867}, {"Vertex_ID": "J", "score": 0.054902205374844214}, {"Vertex_ID": "K", "score": 0.02869374578323252}, {"Vertex_ID": "L", "score": 0.02975219252757403}, {"Vertex_ID": "M", "score": 0.02975219252757403}, {"Vertex_ID": "N", "score": 0.02975219252757403}, {"Vertex_ID": "O", "score": 0.02975219252757403}, {"Vertex_ID": "P", "score": 0.029611982345715077}, {"Vertex_ID": "Q", "score": 0.029611982345715077}, {"Vertex_ID": "R", "score": 0.029611982345715077}, {"Vertex_ID": "S", "score": 0.029611982345715077}, {"Vertex_ID": "T", "score": 0.030833231131841908}]}]
1+
[{"@@top_scores_heap": [{"Vertex_ID": "C", "score": 1.507026}, {"Vertex_ID": "E", "score": 1.503473}, {"Vertex_ID": "F", "score": 1.49345}, {"Vertex_ID": "G", "score": 1.49345}, {"Vertex_ID": "I", "score": 1.485403}, {"Vertex_ID": "H", "score": 1.485403}, {"Vertex_ID": "D", "score": 1.483297}, {"Vertex_ID": "B", "score": 1.367901}, {"Vertex_ID": "J", "score": 1.09461}, {"Vertex_ID": "A", "score": 0.9330747}, {"Vertex_ID": "O", "score": 0.6221145}, {"Vertex_ID": "L", "score": 0.6221145}, {"Vertex_ID": "N", "score": 0.6221145}, {"Vertex_ID": "M", "score": 0.6221145}, {"Vertex_ID": "R", "score": 0.6187774}, {"Vertex_ID": "P", "score": 0.6187774}, {"Vertex_ID": "Q", "score": 0.6187774}, {"Vertex_ID": "S", "score": 0.6187774}, {"Vertex_ID": "T", "score": 0.6181464}, {"Vertex_ID": "K", "score": 0.5711977}]}]
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"@@top_scores_heap": [{"Vertex_ID": "A", "score": 0.030283038177750167}, {"Vertex_ID": "B", "score": 0.043153655387605856}, {"Vertex_ID": "C", "score": 0.043153655387605856}, {"Vertex_ID": "D", "score": 0.04862366075639622}, {"Vertex_ID": "E", "score": 0.04862366075639622}, {"Vertex_ID": "F", "score": 0.04862366075639622}, {"Vertex_ID": "G", "score": 0.04862366075639622}, {"Vertex_ID": "H", "score": 0.05094809395836327}, {"Vertex_ID": "I", "score": 0.05094809395836327}, {"Vertex_ID": "J", "score": 0.05094809395836327}, {"Vertex_ID": "K", "score": 0.05094809395836327}, {"Vertex_ID": "L", "score": 0.05094809395836327}, {"Vertex_ID": "M", "score": 0.05094809395836327}, {"Vertex_ID": "N", "score": 0.05094809395836327}, {"Vertex_ID": "O", "score": 0.05094809395836327}, {"Vertex_ID": "P", "score": 0.051935549088716185}, {"Vertex_ID": "Q", "score": 0.051935549088716185}, {"Vertex_ID": "R", "score": 0.051935549088716185}, {"Vertex_ID": "S", "score": 0.051935549088716185}, {"Vertex_ID": "T", "score": 0.07358805999968221}]}]
1+
[{"@@top_scores_heap": [{"Vertex_ID": "T", "score": 1}, {"Vertex_ID": "S", "score": 1}, {"Vertex_ID": "K", "score": 1}, {"Vertex_ID": "L", "score": 1}, {"Vertex_ID": "O", "score": 1}, {"Vertex_ID": "R", "score": 1}, {"Vertex_ID": "N", "score": 1}, {"Vertex_ID": "M", "score": 1}, {"Vertex_ID": "P", "score": 1}, {"Vertex_ID": "Q", "score": 1}, {"Vertex_ID": "I", "score": 0.2523586}, {"Vertex_ID": "H", "score": 0.2523586}, {"Vertex_ID": "J", "score": 0.2523586}, {"Vertex_ID": "E", "score": 0.2408437}, {"Vertex_ID": "D", "score": 0.2408437}, {"Vertex_ID": "G", "score": 0.2408437}, {"Vertex_ID": "F", "score": 0.2408437}, {"Vertex_ID": "C", "score": 0.21375}, {"Vertex_ID": "B", "score": 0.21375}, {"Vertex_ID": "A", "score": 0.15}]}]

Diff for: tests/run.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
clear
22
python3 test/setup.py &&
3-
# python3 test/baseline/create_baselines.py &&
43
# pytest test/test_centrality.py::TestCentrality::test_degree_centrality1 #test/test_ml.py
5-
pytest test/test_centrality.py::TestCentrality::test_pagerank
4+
# pytest test/test_centrality.py::TestCentrality::test_pagerank
65
# pytest test/test_ml.py
6+
pytest test/test_centrality.py::TestCentrality
77
echo 'done'

0 commit comments

Comments
 (0)