Pymocd
A Multi-objective community detection library written in Rust exposed to python through PyO3
Install / Use
/learn @oliveira-sh/PymocdREADME
<strong>Python Multi-Objective Community Detection Algorithms</strong>
</div>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{Santos2025,
author = {Santos, Guilherme O. and Vieira, Lucas S. and Rossetti, Giulio and Ferreira, Carlos H. G. and Moreira, Gladston J. P.},
title = {A high-performance evolutionary multiobjective community detection algorithm},
journal = {Social Network Analysis and Mining},
year = {2025},
volume = {15},
number = {1},
pages = {110},
doi = {10.1007/s13278-025-01519-7},
url = {https://doi.org/10.1007/s13278-025-01519-7},
issn = {1869-5469},
date = {2025-11-18}
}
Related Skills
node-connect
350.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
350.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
350.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
