Skip to content

Commit b5d8fbc

Browse files
committed
update graph info in readme
1 parent c1c4b35 commit b5d8fbc

File tree

3 files changed

+31
-21
lines changed

3 files changed

+31
-21
lines changed

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -280,20 +280,28 @@ The `er_*` Erdos-Renyi random graphs are generated with `eg.erdos_renyi_P()`, av
280280
281281
282282
283+
284+
283285
<!-- BEGIN DATASET TABLE -->
284286
285287
| Dataset Name | nodes | edges | is_directed | average_degree | density | type |
286288
|-----|-----|-----|-----|-----|-----|-----|
287289
| [cheminformatics](https://networkrepository.com/ENZYMES-g1.php) | 37 | 168 | True | 9.08108108108108 | 0.12612612612612611 | easygraph.classes.directed_graph.DiGraph |
288290
| [eco](https://networkrepository.com/econ-mahindas.php) | 1258 | 7619 | False | 12.112877583465819 | 0.009636338570776308 | networkx.classes.graph.Graph |
289291
| [bio](https://networkrepository.com/bio-yeast.php) | 1458 | 1948 | False | 2.672153635116598 | 0.0018340107310340413 | easygraph.classes.graph.Graph |
292+
| road_sampled | 2075 | 1132 | False | 1.0910843373493977 | 0.0005260773082687548 | networkx.classes.graph.Graph |
293+
| coauthorship_sampled | 4340 | 6398 | False | 2.9483870967741934 | 0.0006795084343798557 | networkx.classes.graph.Graph |
290294
| [uspowergrid](https://toreopsahl.com/datasets/#uspowergrid) | 4941 | 6594 | False | 2.66909532483303 | 0.0005403026973346214 | networkx.classes.graph.Graph |
291-
| [enron](https://snap.stanford.edu/data/email-Enron.html) | 36692 | 183831 | False | 10.020222391802028 | 0.00027309755503535 | networkx.classes.graph.Graph |
292-
| [pgp](https://github.com/tddschn/easygraph-bench/blob/master/dataset/pgp/pgp.xml) | 39796 | 301498 | True | 15.15217609810031 | 0.00019037788790175037 | networkx.classes.digraph.DiGraph |
293-
| [pgp_undirected](https://github.com/tddschn/easygraph-bench/blob/master/dataset/pgp/pgp_undirected.xml) | 39796 | 197150 | False | 9.908030957885215 | 0.00024897677994434515 | networkx.classes.graph.Graph |
294-
| [road](https://networkrepository.com/road-usa.php) | 129164 | 165435 | False | 2.5616270787525934 | 1.9832514564949666e-05 | easygraph.classes.graph.Graph |
295-
| [amazon](https://snap.stanford.edu/data/amazon0302.html) | 262111 | 1234877 | True | 9.42254998836371 | 1.7974419114806206e-05 | networkx.classes.digraph.DiGraph |
296-
| [coauthorship](https://github.com/chenyang03/co-authorship-network) | 402392 | 1234019 | False | 6.1334171653512 | 1.5242431280399412e-05 | networkx.classes.graph.Graph |
295+
| pgp_sampled | 6465 | 18906 | True | 5.848723897911833 | 0.00045240747972709105 | networkx.classes.digraph.DiGraph |
296+
| pgp_undirected_sampled | 8781 | 51939 | False | 11.829859924837718 | 0.0013473644561318586 | networkx.classes.graph.Graph |
297+
| enron_sampled | 9301 | 79905 | False | 17.182023438339964 | 0.001847529401972039 | networkx.classes.graph.Graph |
298+
| [enron](https://github.com/tddschn/easygraph-bench/blob/master/dataset/sampled) | 36692 | 183831 | False | 10.020222391802028 | 0.00027309755503535 | networkx.classes.graph.Graph |
299+
| [pgp](https://github.com/tddschn/easygraph-bench/blob/master/dataset/sampled) | 39796 | 301498 | True | 15.15217609810031 | 0.00019037788790175037 | networkx.classes.digraph.DiGraph |
300+
| [pgp_undirected](https://github.com/tddschn/easygraph-bench/blob/master/dataset/sampled) | 39796 | 197150 | False | 9.908030957885215 | 0.00024897677994434515 | networkx.classes.graph.Graph |
301+
| [road](https://github.com/tddschn/easygraph-bench/blob/master/dataset/sampled) | 129164 | 165435 | False | 2.5616270787525934 | 1.9832514564949666e-05 | easygraph.classes.graph.Graph |
302+
| [amazon](https://github.com/tddschn/easygraph-bench/blob/master/dataset/sampled) | 262111 | 1234877 | True | 9.42254998836371 | 1.7974419114806206e-05 | networkx.classes.digraph.DiGraph |
303+
| amazon_sampled | 262111 | 1234877 | True | 9.42254998836371 | 1.7974419114806206e-05 | networkx.classes.digraph.DiGraph |
304+
| [coauthorship](https://github.com/tddschn/easygraph-bench/blob/master/dataset/sampled) | 402392 | 1234019 | False | 6.1334171653512 | 1.5242431280399412e-05 | networkx.classes.graph.Graph |
297305
| [google](https://snap.stanford.edu/data/web-Google.html) | 875713 | 5105039 | True | 11.659160021605253 | 6.656960291514363e-06 | networkx.classes.digraph.DiGraph |
298306
| [pokec](https://snap.stanford.edu/data/soc-Pokec.html) | 1632803 | 30622564 | True | 37.50919614919865 | 1.148614349725155e-05 | networkx.classes.digraph.DiGraph |
299307
| [er_500](https://github.com/tddschn/easygraph-bench/blob/master/dataset_loaders.py) | 500 | 2511 | False | 10.044 | 0.020128256513026053 | easygraph.classes.graph.Graph |
@@ -303,8 +311,6 @@ The `er_*` Erdos-Renyi random graphs are generated with `eg.erdos_renyi_P()`, av
303311
304312
305313
<!-- END DATASET TABLE -->
306-
## Results
307-
308314
- Machine: MacBookPro16,2 (Mid-2020 MacBook Pro, Intel i7-1068NG7 (8) @ 2.30GHz, 16GB RAM)
309315
- OS: macOS Monterey 12.6 21G115 x86_64
310316
- python: Python 3.10.5 | packaged by conda-forge | (main, Jun 14 2022, 07:03:09) [Clang 13.0.1 ] on darwin

config.py

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,18 @@
169169
x.removeprefix('load_') for x in random_erdos_renyi_graphs_load_function_names
170170
]
171171

172+
# for sampling graphs
173+
sampled_graph_dir = DATASET_DIR / 'sampled'
174+
default_target_node_number = 10000
175+
sampled_graph_dataset_names = sorted(
176+
(x.stem for x in sorted(sampled_graph_dir.glob('*.edgelist'))),
177+
key=lambda dataset_name: get_dataset_list_sorted_by_nodes_and_edges().index(
178+
dataset_name
179+
)
180+
if dataset_name in get_dataset_list_sorted_by_nodes_and_edges()
181+
else 1000000,
182+
)
183+
172184
easygraph_multipcoessing_methods = [
173185
'laplacian',
174186
'betweenness_centrality',
@@ -216,6 +228,10 @@
216228
er_dataset_name: 'https://github.com/tddschn/easygraph-bench/blob/master/dataset_loaders.py'
217229
for er_dataset_name in random_erdos_renyi_dataset_names
218230
},
231+
**{
232+
sampled_graph_dataset_name: 'https://github.com/tddschn/easygraph-bench/blob/master/dataset/sampled'
233+
for sampled_graph_dataset_name in sampled_graph_dataset_names
234+
},
219235
}
220236

221237

@@ -301,15 +317,3 @@ def read_profile_preparation_code() -> dict[str, str]:
301317
er_dataset_names_for_paper_multiprocessing = [
302318
f'er_{x}' for x in (500, 1000, 5000, 10000)
303319
]
304-
305-
# for sampling graphs
306-
sampled_graph_dir = DATASET_DIR / 'sampled'
307-
default_target_node_number = 10000
308-
sampled_graph_dataset_names = sorted(
309-
(x.stem for x in sorted(sampled_graph_dir.glob('*.edgelist'))),
310-
key=lambda dataset_name: get_dataset_list_sorted_by_nodes_and_edges().index(
311-
dataset_name
312-
)
313-
if dataset_name in get_dataset_list_sorted_by_nodes_and_edges()
314-
else 1000000,
315-
)

gen_graph_info_markdown_table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def get_markdown_content() -> str:
3030
else:
3131
data.append({'Dataset Name': graph_name, **graph_info})
3232

33-
sorted_data = sorted(data, key=lambda x: ((n := x['Dataset Name']).startswith('er_') or n.startswith('[er_'), x['nodes'], n.endswith('_directed'))) # type: ignore
33+
sorted_data = sorted(data, key=lambda x: ((n := x['Dataset Name']).startswith('er_') or n.startswith('[er_'), x['nodes'], 'sampled' in n, n.endswith('_directed'))) # type: ignore
3434
# from icecream import ic
3535

3636
# ic(sorted_data)

0 commit comments

Comments
 (0)