Skip to main content

No project description provided

Project description

pymocd logo

Python Multi-Objective Community Detection Algorithms

PyPI Publish Rust Compilation PyPI - Version PyPI - License

pymocd is a Python library, powered by a Rust backend, for performing efficient multi-objective evolutionary community detection in complex networks. This library is designed to deliver enhanced performance compared to traditional methods, making it particularly well-suited for analyzing large-scale graphs.

Navigate the Documentation for detailed guidance and usage instructions.

Table of Contents


Understanding Community Detection with HP-MOCD

The HP-MOCD algorithm, central to pymocd, identifies community structures within a graph. It proposes a solution by grouping nodes into distinct communities, as illustrated below:

Original Graph Proposed Community Structure

Getting Started

Installing the library using pip interface:

pip install pymocd

For an easy usage:

import networkx
import pymocd

G = networkx.Graph() # Your graph
alg = pymocd.HpMocd(G)
communities = alg.run()

[!IMPORTANT] Graphs must be provided in NetworkX or Igraph compatible format**.

Refer to the official Documentation for detailed instructions and more usage examples.

Contributing

We welcome contributions to pymocd! If you have ideas for new features, bug fixes, or other improvements, please feel free to open an issue or submit a pull request. This project is licensed under the GPL-3.0 or later.


Citation

If you use pymocd or the HP-MOCD algorithm in your research, please cite the following paper:

@article{santos2025hpmocd,
  author    = {Guilherme O. Santos, Lucas S. Vieira, Giulio Rossetti, Carlos H. G. Ferreira and Gladston J. P. Moreira},
  title     = {HP-MOCD: A High-Performance Multi-Objective Community Detection Algorithm for Large-Scale Networks},
  journal   = {The 17th International Conference on Advances in Social Networks Analysis and Mining},
  year      = {2025},
  abstract  = {Community detection in social networks has traditionally been approached as a single-objective optimization problem, with various heuristics targeting specific community-defining metrics. However, this approach often proves inadequate for capturing the multifaceted nature of communities. We introduce HP-MOCD, a fully parallelized, evolutionary high-performance multi-objective community detection algorithm designed specifically for large-scale networks. Our implementation overcomes the computational challenges that typically limit multi-objective approaches in this domain. While performance may decrease with networks containing high proportions of inter-community edges, extensive evaluations on synthetic datasets demonstrate that HP-MOCD achieves an exceptional balance between scalability and detection accuracy. Available as open-source software, HP-MOCD offers researchers and practitioners a practical, powerful solution for complex network analysis, particularly for applications requiring both efficiency and detection quality.},
  keywords  = {community detection, complex networks, evolutionary algorithms, genetic algorithms, multi-objective},
  note      = {Currently under analysis by the journal}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymocd-1.1.3.tar.gz (3.0 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pymocd-1.1.3-cp312-cp312-win_amd64.whl (385.5 kB view details)

Uploaded CPython 3.12Windows x86-64

pymocd-1.1.3-cp312-cp312-manylinux_2_34_x86_64.whl (471.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

pymocd-1.1.3-cp312-cp312-macosx_11_0_arm64.whl (416.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pymocd-1.1.3-cp311-cp311-win_amd64.whl (386.4 kB view details)

Uploaded CPython 3.11Windows x86-64

pymocd-1.1.3-cp311-cp311-manylinux_2_34_x86_64.whl (472.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

pymocd-1.1.3-cp311-cp311-macosx_11_0_arm64.whl (420.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pymocd-1.1.3-cp310-cp310-win_amd64.whl (385.7 kB view details)

Uploaded CPython 3.10Windows x86-64

pymocd-1.1.3-cp310-cp310-manylinux_2_34_x86_64.whl (472.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

pymocd-1.1.3-cp310-cp310-macosx_11_0_arm64.whl (420.2 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

pymocd-1.1.3-cp39-cp39-win_amd64.whl (386.6 kB view details)

Uploaded CPython 3.9Windows x86-64

pymocd-1.1.3-cp39-cp39-manylinux_2_34_x86_64.whl (473.3 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

pymocd-1.1.3-cp39-cp39-macosx_11_0_arm64.whl (420.8 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

pymocd-1.1.3-cp38-cp38-win_amd64.whl (386.5 kB view details)

Uploaded CPython 3.8Windows x86-64

pymocd-1.1.3-cp38-cp38-manylinux_2_34_x86_64.whl (473.3 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.34+ x86-64

pymocd-1.1.3-cp38-cp38-macosx_11_0_arm64.whl (420.6 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

File details

Details for the file pymocd-1.1.3.tar.gz.

File metadata

  • Download URL: pymocd-1.1.3.tar.gz
  • Upload date:
  • Size: 3.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for pymocd-1.1.3.tar.gz
Algorithm Hash digest
SHA256 52ae10e36be4a93d7ecd58c74a9122bf00096f192c38c2985df468831030a873
MD5 c706425bdc11a114b695df732552d70e
BLAKE2b-256 5ad98f3c453d22101ad3270aa258d8797d536eef8203c614d413d64e750d519f

See more details on using hashes here.

File details

Details for the file pymocd-1.1.3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pymocd-1.1.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 385.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for pymocd-1.1.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2575205d31294a4a609785cbe7b95fb5d4f68afe5d85536e6b4d05490cd0a1be
MD5 4e1ccdfc22befe41fb7d7a35c563fd91
BLAKE2b-256 88a5dd32bfc13c0fc165a0263c5d2915aa84832821f2fcfcbca602c337c7f0a5

See more details on using hashes here.

File details

Details for the file pymocd-1.1.3-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for pymocd-1.1.3-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 edaf064c9e8657e71dd294087ac92fe5891fd0596a69ea91d9ee0dcda51f0811
MD5 209ab05230292d161e1353b0850085ef
BLAKE2b-256 1262a2bac44ba60d45b672a8e144661ce033f78b7433df0486369822e4b44d59

See more details on using hashes here.

File details

Details for the file pymocd-1.1.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymocd-1.1.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a9e4da813b258d751c3969e7139b483a54e377d674c2900c9753906d1b606d50
MD5 58cf7e271322d9caafd137542cf91276
BLAKE2b-256 f65c7c768614e5234b66ca5518530eacf71e5a6397775a3f5aae968e5820990b

See more details on using hashes here.

File details

Details for the file pymocd-1.1.3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pymocd-1.1.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 386.4 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for pymocd-1.1.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 51063eb36e08ed9b47794654716847c2aefe9253b59ff5f51579764ec2dd54f3
MD5 00bfff86ddad0eaa8677e3327e8b53bd
BLAKE2b-256 65c455f9fa75cee677f8925d874a448fcaebccb5b834969bba5bdd6a5f6de02c

See more details on using hashes here.

File details

Details for the file pymocd-1.1.3-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for pymocd-1.1.3-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1fb0d5f50d27e386c54e45a6f25f3a72c2841e4a9e3b93d4894d76d3f8f9717f
MD5 605a4627f480281ee27a280b1ffbb162
BLAKE2b-256 61b436c86b259419f0c8bb714ae6a4a71452dc9f569cd171b196a4af9bb2af4a

See more details on using hashes here.

File details

Details for the file pymocd-1.1.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymocd-1.1.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 583da2a66c05f4b939052cc2fb3e3c011b83d6149974d87386f5c0199d062eab
MD5 89436254eeace3a79a33681070bef4b6
BLAKE2b-256 2bff2c3e20c0b075aafb2f0d692f73248bf77f43da6fb0acfef507cd40905e07

See more details on using hashes here.

File details

Details for the file pymocd-1.1.3-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pymocd-1.1.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 385.7 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for pymocd-1.1.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fd239323061bf5425b0f65de13ef4a61cb4861fa011b6e8cb1df38d1b0547a83
MD5 c5c1934f238fb39924682b7e9abe187f
BLAKE2b-256 95b9478a83077aaf3f795bf4da6105208a6caed36db3fbf3902dd9850b26d9fe

See more details on using hashes here.

File details

Details for the file pymocd-1.1.3-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for pymocd-1.1.3-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 463a3a98b86baa09f204dcb214930c035a15535246e2d8919d991221b2416c1a
MD5 dcd9437c369f6df69e6e63a6c6196355
BLAKE2b-256 e5b1ed59a5f52a1af1e9674bfabd07e63b5e311a9086bfc6ecd8e8f5ca93994c

See more details on using hashes here.

File details

Details for the file pymocd-1.1.3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymocd-1.1.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 609dd16b854a43073635f6efacb29a5b07321deb350ef396b7677ba571fb008a
MD5 599fbc598bcfdb05155f602051659c69
BLAKE2b-256 14b471ee2fbe03d96c1a3208c31be7c2dd28c31a51b47dc057c51b651fc74916

See more details on using hashes here.

File details

Details for the file pymocd-1.1.3-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pymocd-1.1.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 386.6 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for pymocd-1.1.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 af77c15f64d0d480917c3126ce2ae367093a1cd4867daf23d9c6fd1c7834a6fc
MD5 0a332e91e46b27fa52762b0379ff59f6
BLAKE2b-256 fcd274b7f182c9ff748ec85299d0c65b6cd4446abf5966c151aa3e96d72e0fe9

See more details on using hashes here.

File details

Details for the file pymocd-1.1.3-cp39-cp39-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for pymocd-1.1.3-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b1598a12ace1ca3a1e67757ad3f77cb3d1150f363754ea3be8b4001d0ba505de
MD5 6788bbbeabfb0f06b388a260227309b9
BLAKE2b-256 db8f1961b274f00d9ca1c6ee013323ada93fe803dce08a3e5111de320b2d06ba

See more details on using hashes here.

File details

Details for the file pymocd-1.1.3-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymocd-1.1.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3a11a780d5263c6b6ff381c8d4474dc100cb7d8e37cf7d1a91c561bc1cbc28c5
MD5 b9d688ead5d446966f3e5e9ae5708322
BLAKE2b-256 eff379073c99155ba67cc6c8d47d8f0989a9dab76b1db256982e518a607760bb

See more details on using hashes here.

File details

Details for the file pymocd-1.1.3-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pymocd-1.1.3-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 386.5 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for pymocd-1.1.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 886eb9f352f759a30db0ff90dc8f67fe62a5a9ee5a23fea65942131b6b7c4ed6
MD5 a96f565970fee172b940ce68f62ce58c
BLAKE2b-256 4aaaa85e2db842c7bb342f115bd188dfe8ab0ce57c809815eed2b79337c74222

See more details on using hashes here.

File details

Details for the file pymocd-1.1.3-cp38-cp38-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for pymocd-1.1.3-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 07b4a1282394a18cd7425c0d72f4ab8902834dd7e778cd4617da0d25f7999557
MD5 2eb71f3c130a0b19137b15ae9399e557
BLAKE2b-256 9cde3e1c111147241853f1b7c7d843bef5b7c0d0e9ded1a474b90914c409c209

See more details on using hashes here.

File details

Details for the file pymocd-1.1.3-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymocd-1.1.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8fd6780de37e7cdea3b0591c5761894309d6e58dfdbef18df3fd4f2c7c50ee62
MD5 46c89534b32d88159cb007b06150745c
BLAKE2b-256 f00ce12f73a08817741463990533b7a79547bc45af487dabae3245bed7f0b2b7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page