Skip to content

Commit 729a4d1

Browse files
author
Mark Needham
committed
louvaining it up
1 parent be27a89 commit 729a4d1

File tree

4 files changed

+335
-52
lines changed

4 files changed

+335
-52
lines changed

notebooks/BetweennessCentrality.ipynb

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

notebooks/Louvain.ipynb

Lines changed: 313 additions & 46 deletions
Large diffs are not rendered by default.

notebooks/PageRank.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@
451451
},
452452
{
453453
"cell_type": "code",
454-
"execution_count": 31,
454+
"execution_count": 32,
455455
"metadata": {},
456456
"outputs": [
457457
{
@@ -463,7 +463,7 @@
463463
"<IPython.core.display.HTML object>"
464464
]
465465
},
466-
"execution_count": 31,
466+
"execution_count": 32,
467467
"metadata": {},
468468
"output_type": "execute_result"
469469
}

notebooks/scripts/algo.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,22 @@ def viz_config(algorithm_name):
3232
'caption': False
3333
}
3434
}
35+
},
36+
"Louvain": {
37+
"query": "MATCH (p1:User)-[r:FRIEND]->(p2:User) RETURN *",
38+
"labels_json": {
39+
'User': {
40+
'caption': 'id',
41+
'size': 'centrality',
42+
'community': 'community'
43+
}
44+
},
45+
"relationships_json": {
46+
'FRIEND': {
47+
'thickness': 'weight',
48+
'caption': False
49+
}
50+
}
3551
}
3652
}[algorithm_name]
3753

0 commit comments

Comments
 (0)