Structural Entropy Community Detection
This repository contains the code for structural entropy community detection. The philosophy behind this method is to use the structural entropy of a network to detect communities. The structural entropy is a measure of the uncertainty of the network structure. The idea is that the higher the uncertainty, the more likely it is that the network is divided into communities.
Installation
To install the package, run the following command:
pip install structural-entropy-community-detection
Or you can directly install the latest version from the GitHub repository:
pip install git+https://github.com/c0mm4nd/structural-entropy-community-detection
Usage
from networkx import karate_club_graph
from se_community import community_detection
G = karate_club_graph()
communities = community_detection(G)
print(communities)
# {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 1, 9: 1, 10: 0, 11: 0, 12: 0, 13: 0, 14: 1, 15: 1, 16: 0, 17: 0, 18: 1, 19: 0, 20: 1, 21: 0, 22: 1, 23: 1, 24: 1, 25: 1, 26: 1, 27: 1, 28: 1, 29: 1, 30: 1, 31: 1, 32: 1, 33: 1}
Contributing
The code is not perfect and there is always room for improvement. If you have any suggestions or ideas, feel free to open an issue or a pull request.
Metadata
Release files for structural-entropy-community-detection 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| structural_entropy_community_detection-0.0.2.tar.gz | 5.7 kB | Without provenance | Details for structural_entropy_community_detection-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| structural_entropy_community_detection-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for structural_entropy_community_detection-0.0.2-py3-none-any.whl |
Total release size: 13.1 kB
Release files / structural_entropy_community_detection-0.0.2.tar.gz
| Download URL | structural_entropy_community_detection-0.0.2.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
86051d93c16dcb4d02b432046c849e17014ad1cb5f23f9b36d21c9a00b1e93d8
|
|
BLAKE2b-256 checksum How to use checksums |
dad2831880f0b47f94db9924e06466145897b95aa7cc15d39f09fe40b58e0e1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.2 Darwin/23.6.0
|
Release files / structural_entropy_community_detection-0.0.2-py3-none-any.whl
| Download URL | structural_entropy_community_detection-0.0.2-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
863265b320363339b040c14b31309130d9fed96c28367196409cb1dafee1ccee
|
|
BLAKE2b-256 checksum How to use checksums |
01f4a163977ea2fb094460932b91d5faaeef9e18625a2b689f368a5a4f1d7374
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.2 Darwin/23.6.0
|
Security for structural-entropy-community-detection 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.