Smart local moving (SLM) community detection in Python/C++, modeled on the Java version on https://github.com/mneedham/slm.
Development: https://github.com/iosonofabio/slmpy
Author: Fabio Zanini
License: MIT
Requirements: pybind11>=2.2, numpy, pkgconfig (see requirements.txt)
from slmpy import ModularityOptimzer
edges = [
[0, 1],
[0, 2],
[0, 3],
[1, 2],
[1, 3],
[2, 3],
[3, 4],
[4, 5],
[4, 6],
[5, 6],
[7, 8],
]
mo = ModularityOptimzer(edges)
mo.fixed_nodes = [0, 4] # This fixes nodes 0 and 4 to be in different communities
communities = mo(algorithm='smart_local_moving')
# Check answer
assert((communities == [0, 0, 0, 0, 1, 1, 1]).all())
Release files for slmpy 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| slmpy-0.3.3.tar.gz | 12.2 kB | Details |
Release files / slmpy-0.3.3.tar.gz
| Download URL | slmpy-0.3.3.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d3368636fe1132f3677faef668c9f7a5ba0a2eae13385bd7501577cbcd4bfba
|
|
BLAKE2b-256 checksum How to use checksums |
4aaf2f8d395df8297ad8209c5cb139d7abf45081b5583c2a972f8c6b38b51e17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
|