-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #149 from tigergraph/degree-cent
Degree cent
- Loading branch information
Showing
187 changed files
with
428 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 50 additions & 49 deletions
99
algorithms/Centrality/degree/unweighted/tg_degree_cent.gsql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Algorithm Testing | ||
|
||
[networkX](https://networkx.org/documentation/stable/reference/index.html) is used as | ||
the baseline for our tests where we can. | ||
|
||
A peculiarity to note about nx is that it counts self edges in undirected graphs as two separate edges. So, you'll see that some baselines use a modified version of the code that is found within nx. Take `run_degree_baseline_complete`, which generates the baseline for degree centrality on complete graphs. It uses the same code that can be found in `nx.centrality.degree_centrality` with the exception of subtracting a node's degree by one. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"top_scores": [{"Vertex_ID": "A", "score": 1.1428571428571428}, {"Vertex_ID": "B", "score": 1.1428571428571428}, {"Vertex_ID": "C", "score": 1.1428571428571428}, {"Vertex_ID": "D", "score": 1.1428571428571428}, {"Vertex_ID": "E", "score": 1.1428571428571428}, {"Vertex_ID": "F", "score": 1.1428571428571428}, {"Vertex_ID": "G", "score": 1.1428571428571428}, {"Vertex_ID": "H", "score": 1.1428571428571428}]}] |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
tests/data/baseline/centrality/degree_centrality/Hub_Spoke.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"top_scores": [{"Vertex_ID": "A", "score": 1.0}, {"Vertex_ID": "B", "score": 0.05263157894736842}, {"Vertex_ID": "C", "score": 0.05263157894736842}, {"Vertex_ID": "D", "score": 0.05263157894736842}, {"Vertex_ID": "E", "score": 0.05263157894736842}, {"Vertex_ID": "F", "score": 0.05263157894736842}, {"Vertex_ID": "G", "score": 0.05263157894736842}, {"Vertex_ID": "H", "score": 0.05263157894736842}, {"Vertex_ID": "I", "score": 0.05263157894736842}, {"Vertex_ID": "J", "score": 0.05263157894736842}, {"Vertex_ID": "K", "score": 0.05263157894736842}, {"Vertex_ID": "L", "score": 0.05263157894736842}, {"Vertex_ID": "M", "score": 0.05263157894736842}, {"Vertex_ID": "N", "score": 0.05263157894736842}, {"Vertex_ID": "O", "score": 0.05263157894736842}, {"Vertex_ID": "P", "score": 0.05263157894736842}, {"Vertex_ID": "Q", "score": 0.05263157894736842}, {"Vertex_ID": "R", "score": 0.05263157894736842}, {"Vertex_ID": "S", "score": 0.05263157894736842}, {"Vertex_ID": "T", "score": 0.05263157894736842}]}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"top_scores": [{"Vertex_ID": "A", "score": 0.05263157894736842}, {"Vertex_ID": "B", "score": 0.10526315789473684}, {"Vertex_ID": "C", "score": 0.10526315789473684}, {"Vertex_ID": "D", "score": 0.10526315789473684}, {"Vertex_ID": "E", "score": 0.10526315789473684}, {"Vertex_ID": "F", "score": 0.10526315789473684}, {"Vertex_ID": "G", "score": 0.10526315789473684}, {"Vertex_ID": "H", "score": 0.10526315789473684}, {"Vertex_ID": "I", "score": 0.10526315789473684}, {"Vertex_ID": "J", "score": 0.10526315789473684}, {"Vertex_ID": "K", "score": 0.10526315789473684}, {"Vertex_ID": "L", "score": 0.10526315789473684}, {"Vertex_ID": "M", "score": 0.10526315789473684}, {"Vertex_ID": "N", "score": 0.10526315789473684}, {"Vertex_ID": "O", "score": 0.10526315789473684}, {"Vertex_ID": "P", "score": 0.10526315789473684}, {"Vertex_ID": "Q", "score": 0.10526315789473684}, {"Vertex_ID": "R", "score": 0.10526315789473684}, {"Vertex_ID": "S", "score": 0.10526315789473684}, {"Vertex_ID": "T", "score": 0.05263157894736842}]}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"top_scores": [{"Vertex_ID": "A", "score": 0.10526315789473684}, {"Vertex_ID": "B", "score": 0.10526315789473684}, {"Vertex_ID": "C", "score": 0.10526315789473684}, {"Vertex_ID": "D", "score": 0.10526315789473684}, {"Vertex_ID": "E", "score": 0.10526315789473684}, {"Vertex_ID": "F", "score": 0.10526315789473684}, {"Vertex_ID": "G", "score": 0.10526315789473684}, {"Vertex_ID": "H", "score": 0.10526315789473684}, {"Vertex_ID": "I", "score": 0.10526315789473684}, {"Vertex_ID": "J", "score": 0.10526315789473684}, {"Vertex_ID": "K", "score": 0.10526315789473684}, {"Vertex_ID": "L", "score": 0.10526315789473684}, {"Vertex_ID": "M", "score": 0.10526315789473684}, {"Vertex_ID": "N", "score": 0.10526315789473684}, {"Vertex_ID": "O", "score": 0.10526315789473684}, {"Vertex_ID": "P", "score": 0.10526315789473684}, {"Vertex_ID": "Q", "score": 0.10526315789473684}, {"Vertex_ID": "R", "score": 0.10526315789473684}, {"Vertex_ID": "S", "score": 0.10526315789473684}, {"Vertex_ID": "T", "score": 0.10526315789473684}]}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"top_scores": [{"Vertex_ID": "A", "score": 0.10526315789473684}, {"Vertex_ID": "B", "score": 0.15789473684210525}, {"Vertex_ID": "C", "score": 0.15789473684210525}, {"Vertex_ID": "D", "score": 0.15789473684210525}, {"Vertex_ID": "E", "score": 0.15789473684210525}, {"Vertex_ID": "F", "score": 0.15789473684210525}, {"Vertex_ID": "G", "score": 0.15789473684210525}, {"Vertex_ID": "H", "score": 0.15789473684210525}, {"Vertex_ID": "I", "score": 0.15789473684210525}, {"Vertex_ID": "J", "score": 0.10526315789473684}, {"Vertex_ID": "K", "score": 0.05263157894736842}, {"Vertex_ID": "L", "score": 0.05263157894736842}, {"Vertex_ID": "M", "score": 0.05263157894736842}, {"Vertex_ID": "N", "score": 0.05263157894736842}, {"Vertex_ID": "O", "score": 0.05263157894736842}, {"Vertex_ID": "P", "score": 0.05263157894736842}, {"Vertex_ID": "Q", "score": 0.05263157894736842}, {"Vertex_ID": "R", "score": 0.05263157894736842}, {"Vertex_ID": "S", "score": 0.05263157894736842}, {"Vertex_ID": "T", "score": 0.05263157894736842}]}] |
1 change: 1 addition & 0 deletions
1
tests/data/baseline/centrality/degree_centrality/in_degree/Hub_Spoke_Directed.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"top_scores": [{"Vertex_ID": "A", "score": 0.0}, {"Vertex_ID": "B", "score": 0.05263157894736842}, {"Vertex_ID": "C", "score": 0.05263157894736842}, {"Vertex_ID": "D", "score": 0.05263157894736842}, {"Vertex_ID": "E", "score": 0.05263157894736842}, {"Vertex_ID": "F", "score": 0.05263157894736842}, {"Vertex_ID": "G", "score": 0.05263157894736842}, {"Vertex_ID": "H", "score": 0.05263157894736842}, {"Vertex_ID": "I", "score": 0.05263157894736842}, {"Vertex_ID": "J", "score": 0.05263157894736842}, {"Vertex_ID": "K", "score": 0.05263157894736842}, {"Vertex_ID": "L", "score": 0.05263157894736842}, {"Vertex_ID": "M", "score": 0.05263157894736842}, {"Vertex_ID": "N", "score": 0.05263157894736842}, {"Vertex_ID": "O", "score": 0.05263157894736842}, {"Vertex_ID": "P", "score": 0.05263157894736842}, {"Vertex_ID": "Q", "score": 0.05263157894736842}, {"Vertex_ID": "R", "score": 0.05263157894736842}, {"Vertex_ID": "S", "score": 0.05263157894736842}, {"Vertex_ID": "T", "score": 0.05263157894736842}]}] |
1 change: 1 addition & 0 deletions
1
tests/data/baseline/centrality/degree_centrality/in_degree/Line_Directed.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"top_scores": [{"Vertex_ID": "A", "score": 0.0}, {"Vertex_ID": "B", "score": 0.05263157894736842}, {"Vertex_ID": "C", "score": 0.05263157894736842}, {"Vertex_ID": "D", "score": 0.05263157894736842}, {"Vertex_ID": "E", "score": 0.05263157894736842}, {"Vertex_ID": "F", "score": 0.05263157894736842}, {"Vertex_ID": "G", "score": 0.05263157894736842}, {"Vertex_ID": "H", "score": 0.05263157894736842}, {"Vertex_ID": "I", "score": 0.05263157894736842}, {"Vertex_ID": "J", "score": 0.05263157894736842}, {"Vertex_ID": "K", "score": 0.05263157894736842}, {"Vertex_ID": "L", "score": 0.05263157894736842}, {"Vertex_ID": "M", "score": 0.05263157894736842}, {"Vertex_ID": "N", "score": 0.05263157894736842}, {"Vertex_ID": "O", "score": 0.05263157894736842}, {"Vertex_ID": "P", "score": 0.05263157894736842}, {"Vertex_ID": "Q", "score": 0.05263157894736842}, {"Vertex_ID": "R", "score": 0.05263157894736842}, {"Vertex_ID": "S", "score": 0.05263157894736842}, {"Vertex_ID": "T", "score": 0.05263157894736842}]}] |
1 change: 1 addition & 0 deletions
1
tests/data/baseline/centrality/degree_centrality/in_degree/Ring_Directed.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"top_scores": [{"Vertex_ID": "A", "score": 0.05263157894736842}, {"Vertex_ID": "B", "score": 0.05263157894736842}, {"Vertex_ID": "C", "score": 0.05263157894736842}, {"Vertex_ID": "D", "score": 0.05263157894736842}, {"Vertex_ID": "E", "score": 0.05263157894736842}, {"Vertex_ID": "F", "score": 0.05263157894736842}, {"Vertex_ID": "G", "score": 0.05263157894736842}, {"Vertex_ID": "H", "score": 0.05263157894736842}, {"Vertex_ID": "I", "score": 0.05263157894736842}, {"Vertex_ID": "J", "score": 0.05263157894736842}, {"Vertex_ID": "K", "score": 0.05263157894736842}, {"Vertex_ID": "L", "score": 0.05263157894736842}, {"Vertex_ID": "M", "score": 0.05263157894736842}, {"Vertex_ID": "N", "score": 0.05263157894736842}, {"Vertex_ID": "O", "score": 0.05263157894736842}, {"Vertex_ID": "P", "score": 0.05263157894736842}, {"Vertex_ID": "Q", "score": 0.05263157894736842}, {"Vertex_ID": "R", "score": 0.05263157894736842}, {"Vertex_ID": "S", "score": 0.05263157894736842}, {"Vertex_ID": "T", "score": 0.05263157894736842}]}] |
1 change: 1 addition & 0 deletions
1
tests/data/baseline/centrality/degree_centrality/in_degree/Tree_Directed.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"top_scores": [{"Vertex_ID": "A", "score": 0.0}, {"Vertex_ID": "B", "score": 0.05263157894736842}, {"Vertex_ID": "C", "score": 0.05263157894736842}, {"Vertex_ID": "D", "score": 0.05263157894736842}, {"Vertex_ID": "E", "score": 0.05263157894736842}, {"Vertex_ID": "F", "score": 0.05263157894736842}, {"Vertex_ID": "G", "score": 0.05263157894736842}, {"Vertex_ID": "H", "score": 0.05263157894736842}, {"Vertex_ID": "I", "score": 0.05263157894736842}, {"Vertex_ID": "J", "score": 0.05263157894736842}, {"Vertex_ID": "K", "score": 0.05263157894736842}, {"Vertex_ID": "L", "score": 0.05263157894736842}, {"Vertex_ID": "M", "score": 0.05263157894736842}, {"Vertex_ID": "N", "score": 0.05263157894736842}, {"Vertex_ID": "O", "score": 0.05263157894736842}, {"Vertex_ID": "P", "score": 0.05263157894736842}, {"Vertex_ID": "Q", "score": 0.05263157894736842}, {"Vertex_ID": "R", "score": 0.05263157894736842}, {"Vertex_ID": "S", "score": 0.05263157894736842}, {"Vertex_ID": "T", "score": 0.05263157894736842}]}] |
1 change: 1 addition & 0 deletions
1
tests/data/baseline/centrality/degree_centrality/out_degree/Hub_Spoke_Directed.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"top_scores": [{"Vertex_ID": "A", "score": 1.0}, {"Vertex_ID": "B", "score": 0.0}, {"Vertex_ID": "C", "score": 0.0}, {"Vertex_ID": "D", "score": 0.0}, {"Vertex_ID": "E", "score": 0.0}, {"Vertex_ID": "F", "score": 0.0}, {"Vertex_ID": "G", "score": 0.0}, {"Vertex_ID": "H", "score": 0.0}, {"Vertex_ID": "I", "score": 0.0}, {"Vertex_ID": "J", "score": 0.0}, {"Vertex_ID": "K", "score": 0.0}, {"Vertex_ID": "L", "score": 0.0}, {"Vertex_ID": "M", "score": 0.0}, {"Vertex_ID": "N", "score": 0.0}, {"Vertex_ID": "O", "score": 0.0}, {"Vertex_ID": "P", "score": 0.0}, {"Vertex_ID": "Q", "score": 0.0}, {"Vertex_ID": "R", "score": 0.0}, {"Vertex_ID": "S", "score": 0.0}, {"Vertex_ID": "T", "score": 0.0}]}] |
1 change: 1 addition & 0 deletions
1
tests/data/baseline/centrality/degree_centrality/out_degree/Line_Directed.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"top_scores": [{"Vertex_ID": "A", "score": 0.05263157894736842}, {"Vertex_ID": "B", "score": 0.05263157894736842}, {"Vertex_ID": "C", "score": 0.05263157894736842}, {"Vertex_ID": "D", "score": 0.05263157894736842}, {"Vertex_ID": "E", "score": 0.05263157894736842}, {"Vertex_ID": "F", "score": 0.05263157894736842}, {"Vertex_ID": "G", "score": 0.05263157894736842}, {"Vertex_ID": "H", "score": 0.05263157894736842}, {"Vertex_ID": "I", "score": 0.05263157894736842}, {"Vertex_ID": "J", "score": 0.05263157894736842}, {"Vertex_ID": "K", "score": 0.05263157894736842}, {"Vertex_ID": "L", "score": 0.05263157894736842}, {"Vertex_ID": "M", "score": 0.05263157894736842}, {"Vertex_ID": "N", "score": 0.05263157894736842}, {"Vertex_ID": "O", "score": 0.05263157894736842}, {"Vertex_ID": "P", "score": 0.05263157894736842}, {"Vertex_ID": "Q", "score": 0.05263157894736842}, {"Vertex_ID": "R", "score": 0.05263157894736842}, {"Vertex_ID": "S", "score": 0.05263157894736842}, {"Vertex_ID": "T", "score": 0.0}]}] |
Oops, something went wrong.