{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python" ], "description": "[![Build Status](https://travis-ci.org/ckmanalytix/modularity-density.svg?branch=master)](https://travis-ci.org/ckmanalytix/modularity-density) ![Python badge](https://img.shields.io/badge/python-3.5|3.6|3.7-.svg)\n\nCommunity detection by fine-tuned optimization of modularity\nand modularity density\n\nDependencies\n------------\n\n\n \n \n\n \n \n\n\n \n \n\n\n \n \n\n
Python\n >= 3.5.0 \n \n
NetworkX\n >= 2.2s\n \n
NumPy\n >= 1.15.1\n \n
SciPy\n >= 1.1.0\n \n
\n\nInstallation\n-----\n```sh\npip install modularitydensity\n```\n\nQuick Start\n-----\n```python\nimport networkx as nx\nimport numpy as np\nfrom modularitydensity.metrics import modularity_density\nfrom modularitydensity.fine_tuned_modularity_density import fine_tuned_clustering_qds\n\nG = nx.karate_club_graph() #sample dataset\nadj = nx.to_scipy_sparse_matrix(G) #convert to sparse matrix\n\ncommunity_array = fine_tuned_clustering_qds(G)\nprint(community_array)\n>> [2 2 2 2 4 4 4 2 3 3 4 2 2 2 3 3 4 2 3 2 3 2 3 3 1 1 3 3 3 3 3 1 3 3]\n\ncomputed_metric = modularity_density(adj, community_array, np.unique(community_array))\nprint(computed_metric)\n>> 0.2312650016945721 \n```\n\nDescription\n-----------\n\nThis package comprises two community detection algorithms which perform fine-tuned\noptimization of modularity and modularity density, respectively,\nof a community network structure. The fine-tuned algorithm iteratively\ncarries out splitting and merging stages, alternatively, until\nneither splitting nor merging of the community structure\nimproves the desired metric.\n\nAlso included are extensions of the fine_tuned optimizations of both\nmodules. These extended versions account for any\nconstraint on the maximum community size, while optimizing the desired metric.\n\nSource code can be found at: https://github.com/ckmanalytix/modularity-density/\n\nReferences\n----------\n[1] CHEN M, KUZMIN K, SZYMANSKI BK. Community detection via maximization of\nmodularity and its variants. IEEE Transactions on Computational Social Systems.\n1(1), 46\u201365, 2014\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ckmanalytix/modularity-density", "keywords": "", "license": "MIT License (MIT License)", "maintainer": "", "maintainer_email": "", "name": "modularitydensity", "package_url": "https://pypi.org/project/modularitydensity/", "platform": "", "project_url": "https://pypi.org/project/modularitydensity/", "project_urls": { "Homepage": "https://github.com/ckmanalytix/modularity-density" }, "release_url": "https://pypi.org/project/modularitydensity/0.0.6/", "requires_dist": [ "numpy (>=1.15.1)", "scipy (>=1.1.0)", "networkx (>=2.2)", "pytest ; extra == 'testing'", "pytest-cov ; extra == 'testing'" ], "requires_python": ">= 3.5", "summary": "Run modularity density-based clustering", "version": "0.0.6" }, "last_serial": 4925685, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "9202ca5814e06748c615b030a66b3f33", "sha256": "fc13b112c230f2cce032908b0333adb6ba7c327f8ee58940abe83f2857820d64" }, "downloads": -1, "filename": "modularitydensity-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9202ca5814e06748c615b030a66b3f33", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">= 3.5", "size": 28861, "upload_time": "2019-03-08T19:08:32", "url": "https://files.pythonhosted.org/packages/d2/be/408b0ea16805c6ebeaba84c63a681d0c447206e0e96f310c490160af3c2b/modularitydensity-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e0c38c46b63db0f62c1d6d407f569ddc", "sha256": "4d8d4c86691d4d92529fb24cd30cebcd7a55e096f32fa7a2be4fe9763025091c" }, "downloads": -1, "filename": "modularitydensity-0.0.1.tar.gz", "has_sig": false, "md5_digest": "e0c38c46b63db0f62c1d6d407f569ddc", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.5", "size": 127040, "upload_time": "2019-03-08T19:08:34", "url": "https://files.pythonhosted.org/packages/6c/83/b9a6e4e5f1eda0f88e4d17f57d2e8aeb334f530dd321034ac3b661f896ce/modularitydensity-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "b9543f072220a9e62c311eb5385b235b", "sha256": "7e01d1472f78e48891f29c3200753175aa51d685a09a4b044a29d899d3bdbfa8" }, "downloads": -1, "filename": "modularitydensity-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b9543f072220a9e62c311eb5385b235b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">= 3.5", "size": 28863, "upload_time": "2019-03-08T19:18:17", "url": "https://files.pythonhosted.org/packages/ae/38/0cb599e505078754ff80f15d128150de0cdde2614d10e4d04a24e55786c1/modularitydensity-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5e7835677588337b4b91f98607028f91", "sha256": "fea6fa8ebe5201691eae42a4912953cc11022b85e638ce8a40219d001ed07cf4" }, "downloads": -1, "filename": "modularitydensity-0.0.2.tar.gz", "has_sig": false, "md5_digest": "5e7835677588337b4b91f98607028f91", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.5", "size": 127823, "upload_time": "2019-03-08T19:18:19", "url": "https://files.pythonhosted.org/packages/8d/f3/378959989eda3850e9a70694b114ae277ad2f8ae7e9fa6e0668155251a46/modularitydensity-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "d7e9f6c50247dfddd4ea69176108a7ee", "sha256": "92754fc87849839cfa490e8d8276753a96c6a969cf69dd4c27b3dc0b9b316a52" }, "downloads": -1, "filename": "modularitydensity-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d7e9f6c50247dfddd4ea69176108a7ee", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">= 3.5", "size": 28872, "upload_time": "2019-03-08T19:19:34", "url": "https://files.pythonhosted.org/packages/3c/91/3146816f4e56ae908891abd49ec4db518b34f3eecc06057930bdeac27441/modularitydensity-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "30513bd65cd7092839f54405beefad88", "sha256": "42d25cab25f2e566e8f4222aa24915b0348cf38d0c714654785d40afaec8683f" }, "downloads": -1, "filename": "modularitydensity-0.0.3.tar.gz", "has_sig": false, "md5_digest": "30513bd65cd7092839f54405beefad88", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.5", "size": 127810, "upload_time": "2019-03-08T19:19:35", "url": "https://files.pythonhosted.org/packages/f0/04/243fe08af346dbe88116554192e76629a518e380d7bf729173af1d8e2360/modularitydensity-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "1d9c302f5ab12cbd731696e7b6dc40a2", "sha256": "81a55ed240a9e46b9267b8275dbdf1e24bf0e20f35291ff500bfe31d1d82b381" }, "downloads": -1, "filename": "modularitydensity-0.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1d9c302f5ab12cbd731696e7b6dc40a2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">= 3.5", "size": 28855, "upload_time": "2019-03-08T19:25:50", "url": "https://files.pythonhosted.org/packages/36/a7/77c8ff94bd7f0084d6573fc2cd7eb07235db8ca34ac5cf35aab6956d617d/modularitydensity-0.0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c0e4e901b9414cbf02ffee2ea4bb5a5b", "sha256": "0973cdaf07d630e8d3398658feaab715fc7fb10f7ca5703c7c11a65097453c70" }, "downloads": -1, "filename": "modularitydensity-0.0.4.tar.gz", "has_sig": false, "md5_digest": "c0e4e901b9414cbf02ffee2ea4bb5a5b", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.5", "size": 127749, "upload_time": "2019-03-08T19:25:51", "url": "https://files.pythonhosted.org/packages/2c/1c/61b51f100276d824a65739eda6e3dc7896428ba12dc6ce8a6b03dae67d0b/modularitydensity-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "64a5fcfcd8a4455fd01efbf993b571b8", "sha256": "6512dd919e9f972f3b5a3ad26ee4b38b80b496cf28220ad63e6b58d23a5282cc" }, "downloads": -1, "filename": "modularitydensity-0.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "64a5fcfcd8a4455fd01efbf993b571b8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">= 3.5", "size": 28826, "upload_time": "2019-03-08T20:43:22", "url": "https://files.pythonhosted.org/packages/79/75/14069ce7ab635291f5573841f04b1d3ef00cf79907b7f604139517f377d0/modularitydensity-0.0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fe69d781253e13ceb458122ea8f31899", "sha256": "7598f62393e41c1dbcbe49a3a9b4b29f1b8a8963df7e7555761e72302321dffb" }, "downloads": -1, "filename": "modularitydensity-0.0.5.tar.gz", "has_sig": false, "md5_digest": "fe69d781253e13ceb458122ea8f31899", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.5", "size": 127782, "upload_time": "2019-03-08T20:43:23", "url": "https://files.pythonhosted.org/packages/e9/57/8e8311d6b3d87dfe32f7d61bf07c70fd4bed930371adebcadc2b41b7b9a6/modularitydensity-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "9f5aac6a991c29f0180e9d6517480c9a", "sha256": "ba575dc4302ac65cb3619c2ca0755deebe1b63b801a0d5e0e7176d0cf615d239" }, "downloads": -1, "filename": "modularitydensity-0.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9f5aac6a991c29f0180e9d6517480c9a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">= 3.5", "size": 28813, "upload_time": "2019-03-11T15:13:09", "url": "https://files.pythonhosted.org/packages/95/e7/abbc982cb9979e6486f9437f67cad4771e187a922401b31fecd40751887a/modularitydensity-0.0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0aeb14d0483f00ba581dafdeee68b372", "sha256": "51faa5a5eb93aaa477a0245b5053e71a8a416bece9ec59819b6fb421d968d247" }, "downloads": -1, "filename": "modularitydensity-0.0.6.tar.gz", "has_sig": false, "md5_digest": "0aeb14d0483f00ba581dafdeee68b372", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.5", "size": 127607, "upload_time": "2019-03-11T15:13:10", "url": "https://files.pythonhosted.org/packages/b5/23/f449004d86521ae472b5bd2cffbeedb001ce2b1c8d347c018450e9af0a9d/modularitydensity-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9f5aac6a991c29f0180e9d6517480c9a", "sha256": "ba575dc4302ac65cb3619c2ca0755deebe1b63b801a0d5e0e7176d0cf615d239" }, "downloads": -1, "filename": "modularitydensity-0.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9f5aac6a991c29f0180e9d6517480c9a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">= 3.5", "size": 28813, "upload_time": "2019-03-11T15:13:09", "url": "https://files.pythonhosted.org/packages/95/e7/abbc982cb9979e6486f9437f67cad4771e187a922401b31fecd40751887a/modularitydensity-0.0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0aeb14d0483f00ba581dafdeee68b372", "sha256": "51faa5a5eb93aaa477a0245b5053e71a8a416bece9ec59819b6fb421d968d247" }, "downloads": -1, "filename": "modularitydensity-0.0.6.tar.gz", "has_sig": false, "md5_digest": "0aeb14d0483f00ba581dafdeee68b372", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.5", "size": 127607, "upload_time": "2019-03-11T15:13:10", "url": "https://files.pythonhosted.org/packages/b5/23/f449004d86521ae472b5bd2cffbeedb001ce2b1c8d347c018450e9af0a9d/modularitydensity-0.0.6.tar.gz" } ] }