Skip to content

ECG Community Detection implementation#502

Open
ryandewolfe33 wants to merge 3 commits intoJuliaGraphs:masterfrom
ryandewolfe33:ECG
Open

ECG Community Detection implementation#502
ryandewolfe33 wants to merge 3 commits intoJuliaGraphs:masterfrom
ryandewolfe33:ECG

Conversation

@ryandewolfe33
Copy link
Contributor

Another community detection algorithm, see #231

Ensemble Clustering for Graphs (ECG) uses many runs of Louvain (see #488 ) to improve performance and stability.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

Benchmark Results (Julia v1)

Time benchmarks
master 9c74c3b... master / 9c74c3b...
centrality/digraphs/betweenness_centrality 16.9 ± 0.42 ms 16.2 ± 0.38 ms 1.04 ± 0.035
centrality/digraphs/closeness_centrality 11.2 ± 0.49 ms 11.4 ± 0.41 ms 0.984 ± 0.056
centrality/digraphs/degree_centrality 1.94 ± 0.17 μs 2 ± 0.18 μs 0.971 ± 0.12
centrality/digraphs/katz_centrality 0.877 ± 0.053 ms 0.871 ± 0.056 ms 1.01 ± 0.089
centrality/digraphs/pagerank 0.0366 ± 0.0008 ms 0.0364 ± 0.0006 ms 1 ± 0.028
centrality/graphs/betweenness_centrality 28.6 ± 1.2 ms 28.8 ± 1.2 ms 0.994 ± 0.059
centrality/graphs/closeness_centrality 20.8 ± 0.12 ms 21.1 ± 0.14 ms 0.988 ± 0.0087
centrality/graphs/degree_centrality 1.5 ± 0.16 μs 1.55 ± 0.21 μs 0.968 ± 0.17
centrality/graphs/katz_centrality 1.04 ± 0.07 ms 1.03 ± 0.061 ms 1 ± 0.089
connectivity/digraphs/strongly_connected_components 0.0436 ± 0.0013 ms 0.0431 ± 0.0014 ms 1.01 ± 0.044
connectivity/graphs/connected_components 24.2 ± 0.65 μs 24.3 ± 0.67 μs 0.997 ± 0.038
core/edges/digraphs 7.08 ± 0.01 μs 7.08 ± 0.01 μs 1 ± 0.002
core/edges/graphs 17.4 ± 0.09 μs 17.4 ± 0.081 μs 0.997 ± 0.0069
core/has_edge/digraphs 5.29 ± 0.4 μs 5.32 ± 0.36 μs 0.994 ± 0.1
core/has_edge/graphs 5.52 ± 0.41 μs 5.58 ± 0.39 μs 0.989 ± 0.1
core/nv/digraphs 0.361 ± 0.01 μs 0.37 ± 0.01 μs 0.976 ± 0.038
core/nv/graphs 0.381 ± 0.01 μs 0.371 ± 0.01 μs 1.03 ± 0.039
edges/fille 8.37 ± 1.2 μs 8.22 ± 1.1 μs 1.02 ± 0.2
edges/fillp 4.54 ± 4.8 μs 4.8 ± 4.4 μs 0.946 ± 1.3
edges/tsume 2.5 ± 0.02 μs 2.47 ± 0.04 μs 1.01 ± 0.018
edges/tsump 2.56 ± 0.12 μs 2.49 ± 0.039 μs 1.03 ± 0.051
insertions/SG(n,e) Generation 24.8 ± 3.9 ms 25 ± 4.1 ms 0.992 ± 0.23
parallel/egonet/twohop 0.29 ± 0.0037 s 0.289 ± 0.0015 s 1 ± 0.014
parallel/egonet/vertexfunction 2.27 ± 0.092 ms 2.28 ± 0.073 ms 0.998 ± 0.052
serial/egonet/twohop 0.287 ± 0.0027 s 0.287 ± 0.0036 s 1 ± 0.016
serial/egonet/vertexfunction 2.21 ± 0.059 ms 2.16 ± 0.069 ms 1.02 ± 0.042
traversals/digraphs/bfs_tree 0.0495 ± 0.0091 ms 0.0495 ± 0.006 ms 0.998 ± 0.22
traversals/digraphs/dfs_tree 0.0643 ± 0.0095 ms 0.0638 ± 0.0089 ms 1.01 ± 0.2
traversals/graphs/bfs_tree 0.0529 ± 0.0025 ms 0.0529 ± 0.0023 ms 1 ± 0.064
traversals/graphs/dfs_tree 0.0659 ± 0.0043 ms 0.0655 ± 0.0034 ms 1.01 ± 0.083
time_to_load 0.541 ± 0.00087 s 0.542 ± 0.0015 s 0.999 ± 0.0031
Memory benchmarks
master 9c74c3b... master / 9c74c3b...
centrality/digraphs/betweenness_centrality 0.29 M allocs: 24 MB 0.29 M allocs: 24 MB 1
centrality/digraphs/closeness_centrality 18.6 k allocs: 14.5 MB 18.6 k allocs: 14.5 MB 1
centrality/digraphs/degree_centrality 8 allocs: 5.01 kB 8 allocs: 5.01 kB 1
centrality/digraphs/katz_centrality 2.63 k allocs: 2.83 MB 2.63 k allocs: 2.83 MB 1
centrality/digraphs/pagerank 21 allocs: 14.9 kB 21 allocs: 14.9 kB 1
centrality/graphs/betweenness_centrality 0.545 M allocs: 0.0313 GB 0.545 M allocs: 0.0313 GB 1
centrality/graphs/closeness_centrality 19.3 k allocs: 14 MB 19.3 k allocs: 14 MB 1
centrality/graphs/degree_centrality 10 allocs: 5.43 kB 10 allocs: 5.43 kB 1
centrality/graphs/katz_centrality 2.96 k allocs: 3.1 MB 2.96 k allocs: 3.1 MB 1
connectivity/digraphs/strongly_connected_components 1.05 k allocs: 0.075 MB 1.05 k allocs: 0.075 MB 1
connectivity/graphs/connected_components 0.061 k allocs: 22.5 kB 0.061 k allocs: 22.5 kB 1
core/edges/digraphs 3 allocs: 0.0938 kB 3 allocs: 0.0938 kB 1
core/edges/graphs 3 allocs: 0.0938 kB 3 allocs: 0.0938 kB 1
core/has_edge/digraphs 20 allocs: 12.6 kB 20 allocs: 12.6 kB 1
core/has_edge/graphs 28 allocs: 13.8 kB 28 allocs: 13.8 kB 1
core/nv/digraphs 3 allocs: 0.0938 kB 3 allocs: 0.0938 kB 1
core/nv/graphs 3 allocs: 0.0938 kB 3 allocs: 0.0938 kB 1
edges/fille 3 allocs: 0.153 MB 3 allocs: 0.153 MB 1
edges/fillp 3 allocs: 0.153 MB 3 allocs: 0.153 MB 1
edges/tsume 0 allocs: 0 B 0 allocs: 0 B
edges/tsump 0 allocs: 0 B 0 allocs: 0 B
insertions/SG(n,e) Generation 0.0465 M allocs: 10.9 MB 0.0465 M allocs: 10.9 MB 0.998
parallel/egonet/twohop 10 allocs: 0.0768 MB 10 allocs: 0.0768 MB 1
parallel/egonet/vertexfunction 10 allocs: 0.0768 MB 10 allocs: 0.0768 MB 1
serial/egonet/twohop 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
serial/egonet/vertexfunction 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
traversals/digraphs/bfs_tree 2.34 k allocs: 0.113 MB 2.34 k allocs: 0.113 MB 1
traversals/digraphs/dfs_tree 2.44 k allocs: 0.118 MB 2.44 k allocs: 0.118 MB 1
traversals/graphs/bfs_tree 2.52 k allocs: 0.121 MB 2.52 k allocs: 0.121 MB 1
traversals/graphs/dfs_tree 2.63 k allocs: 0.127 MB 2.63 k allocs: 0.127 MB 1
time_to_load 0.145 k allocs: 11 kB 0.145 k allocs: 11 kB 1

@codecov
Copy link

codecov bot commented Mar 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.30%. Comparing base (ca5cbc3) to head (9c74c3b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #502      +/-   ##
==========================================
+ Coverage   97.27%   97.30%   +0.03%     
==========================================
  Files         126      127       +1     
  Lines        7674     7695      +21     
==========================================
+ Hits         7465     7488      +23     
+ Misses        209      207       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant