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 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},
  volume    = {X},
  number    = {X},
  pages     = {XX--XX},
  doi       = {XX.XXXX/XXXXXX},
  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.0.3.tar.gz (2.5 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.0.3-cp312-cp312-win_amd64.whl (290.2 kB view details)

Uploaded CPython 3.12Windows x86-64

pymocd-1.0.3-cp312-cp312-manylinux_2_34_x86_64.whl (389.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

pymocd-1.0.3-cp312-cp312-macosx_11_0_arm64.whl (338.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pymocd-1.0.3-cp311-cp311-win_amd64.whl (290.7 kB view details)

Uploaded CPython 3.11Windows x86-64

pymocd-1.0.3-cp311-cp311-manylinux_2_34_x86_64.whl (390.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

pymocd-1.0.3-cp311-cp311-macosx_11_0_arm64.whl (342.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pymocd-1.0.3-cp310-cp310-win_amd64.whl (289.6 kB view details)

Uploaded CPython 3.10Windows x86-64

pymocd-1.0.3-cp310-cp310-manylinux_2_34_x86_64.whl (390.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

pymocd-1.0.3-cp310-cp310-macosx_11_0_arm64.whl (342.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

pymocd-1.0.3-cp39-cp39-win_amd64.whl (290.8 kB view details)

Uploaded CPython 3.9Windows x86-64

pymocd-1.0.3-cp39-cp39-manylinux_2_34_x86_64.whl (391.0 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

pymocd-1.0.3-cp39-cp39-macosx_11_0_arm64.whl (342.8 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

pymocd-1.0.3-cp38-cp38-win_amd64.whl (290.3 kB view details)

Uploaded CPython 3.8Windows x86-64

pymocd-1.0.3-cp38-cp38-manylinux_2_34_x86_64.whl (391.0 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.34+ x86-64

pymocd-1.0.3-cp38-cp38-macosx_11_0_arm64.whl (342.8 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for pymocd-1.0.3.tar.gz
Algorithm Hash digest
SHA256 f4fa02fdfc60aa0c54d29cb871ca1a7b28be543102594dd3df18fd6d56ad8de9
MD5 e7ec3d8ffdff0541e56b2c48c9953506
BLAKE2b-256 2a941ae0bbee0857ba4331fc5de9c7b0290c8629b9516b4f6b6bfb3bd059032d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymocd-1.0.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 290.2 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.0.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4c7358c65c6d3953995fb2c40ec7904190c0e3d24d52389397b58a0a0ba82557
MD5 23b4a39085aaa884c79dca8f30786b91
BLAKE2b-256 c35021de503ba81d23df33a565ff2dd63c1bea797ed439ece7114c408783ad9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymocd-1.0.3-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f798d1e69b5c073b498f84e66e09d74057384ff9cbe2baa16379c2cc2c607e80
MD5 2ed044aff332b7351fd30756335bda3e
BLAKE2b-256 2196489546968986ba889c418e1a1d915bb851f21625ae267a461c6fdb3093c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymocd-1.0.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fcc3ffcec013ca3571c0d7b3120a18e939285c74e41503132043037dd1f84e66
MD5 ea5953ef4a673c6528291cfdb6b66cd7
BLAKE2b-256 ab4adfea30a81f7ff137ffe12c502dc9764f3c442ac23bff0835c8a9f1c5518d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymocd-1.0.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 290.7 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.0.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a71a75eeffbe7ff3a69e7163b956128eb01355891b31776c1a1c98e71d756c99
MD5 f6246fb8a8e105081dac5f793f82a2dd
BLAKE2b-256 9e6a7e49206e1725a3e9431fe0e6e26e6da70e2701c98d914a1abee5a034afa3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymocd-1.0.3-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b4f0b63feffb36ffb992cca042e709dd957fc989ce23d6b6b282194dae24d569
MD5 c3e8512955d076766caa7f594539bfbc
BLAKE2b-256 379ff41e16fd1e69f8b8ae1c7b19150570c16841773d9ed61eebfb65b18b4c2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymocd-1.0.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ca70f1ea3523d8178cb1c535b73db0526ba13145d937c4f356bc6a4e0bf5717b
MD5 8ea5ab27cfeaa5307bba86af50432ffa
BLAKE2b-256 93f93b5c9b4889f572f622047a136821dc9abfbee78cc8115ce658db8e5a11d8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymocd-1.0.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 289.6 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.0.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6b12933471702c2a08e4ae0fa2b02b1c9d545464caaff2c7fea7d74b8c5dd438
MD5 70c45f44dd721bb2115ebe81ca1c878b
BLAKE2b-256 4e1eb638663cdfb1de110842870ab7da7390b74008b4c8a3f60acbc9981f0169

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymocd-1.0.3-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 40d32aa1fbaacb15e9fc1d6c70dfb1109bac07022647c56f1e1aae463d26f6fa
MD5 e9b55f5becae8e3f3e9c34c2ffc6937d
BLAKE2b-256 4f27fdfd0ea95306706b9673eaf93f879258c07fa12fd0a88b1eb46c97cfde9f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymocd-1.0.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7599b8aae1e0e37716548cafae013ca31f22b8684c690a3d50549aebc6eed17c
MD5 fb6e2bae9fb149817a08973549a2e418
BLAKE2b-256 3d5ee488baa842d32e3d3ae16e2a8d24fa2d0f20304bdc80dc915cce9836f994

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymocd-1.0.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 290.8 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.0.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4d5a33d31ed1806ebfc30f3e4027bb99f23cec26bb51e2c146aa9389629b717e
MD5 b91e9a92463ca67cdbdaded0dc36c7f2
BLAKE2b-256 ff5e85ef9cf2d2009b4bd06fd32d391ca3383d1235d94c57d9c3a4a184f37bbf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymocd-1.0.3-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ffa608806ff43d0b2cee54b8d9d3097223e2efc7b36077f7d3db1e131e2f9e5f
MD5 7136a800855836d3c0b7f7ba8a26d23f
BLAKE2b-256 224ab045ed260375cda274ab6555a67982593125dfb040b035da44061ab81650

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymocd-1.0.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 86af5a237841e8f8d97204f93c9fc42d965c1f40a4f2e16198eba9b2b009b8c8
MD5 54f6827072f5dc8e361f720680b2a057
BLAKE2b-256 f1339949e7a0616d9cf5c1698af7835335e6e42a38d898e42a2e04cb19901764

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymocd-1.0.3-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 290.3 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.0.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 ff2568a7bb71f3eb6afdfa09513db3ef2c34c06a8316ce1b7e0dac468a097b54
MD5 42852b32294b45a7c9392dd0f079ea75
BLAKE2b-256 f9e066004453a319323605dafcf76b19b55b03381fa283bf9a89e8c6aabaef43

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymocd-1.0.3-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c12a39d915489f34b6c614c4c48b420eae19dcc4f8844dae4313958f3dc7cfa8
MD5 d96d295e87255a2eb58e5d7157987d54
BLAKE2b-256 35fe39fa44ee8d6f4db5244188a16a203d7f066ede79c47ea43e0a0ae3cc13fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pymocd-1.0.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 51a3214b0cc3e89440f256c1f45e152a820de48f07fbd873b524374fd4ee1db0
MD5 fb9dc6263c7323f7d9a36f59070254af
BLAKE2b-256 ead638c15d0b74f1e79ff878942c727b882c006611715597a533cfa6028c5c36

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