Skip to main content

No project description provided

Project description

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+hhttps://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.

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

Built Distribution

File details

Details for the file structural_entropy_community_detection-0.0.1.tar.gz.

File metadata

File hashes

Hashes for structural_entropy_community_detection-0.0.1.tar.gz
Algorithm Hash digest
SHA256 85023aa0e719101741effeb7073e9faf56b17b6cb201c7308ff1ef5a75b22d2c
MD5 2af53f41647af975c0534272c7f8a977
BLAKE2b-256 63cdb3f43cf723121bcc92ab8a4e494f3f8723f0f2bdc572f806cd8c1aabaf95

See more details on using hashes here.

File details

Details for the file structural_entropy_community_detection-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for structural_entropy_community_detection-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ccd56815ddbfb5a9e3e90c862f0b3bb63f107eb677a54aab90f720976d41aa5d
MD5 d8558ef9a628029b05511885282656ca
BLAKE2b-256 b7b49fe702e3064102c5cb53ab906ae0b978d9944075bc829d03b8336192bcfd

See more details on using hashes here.

Supported by

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