{ "info": { "author": "Peter Volf", "author_email": "do.volfp@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Natural Language :: English", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Information Analysis", "Topic :: Scientific/Engineering :: Mathematics", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "# LocalClustering\n\nThe project implements multiple variations of a *local* graph clustering algorithm named the *Hermina-Janos algorithm* in memory of my beloved grandparents.\n\nGraph cluster analysis is used in a wide variety of fields. This project does not target one specific field, instead it aims to be a general tool for graph cluster analysis for cases where global cluster analysis is not applicable or practical for example because of the size of the data set or because a different (local) perspective is required.\n\nThe algorithms are independent of the cluster definition. The interface cluster definitions must implement can be found in the `definitions` package along with a simple connectivity based cluster definition implementation. Besides the algorithms and the cluster definition, other utilities are also provided, most notably a module for node `ranking`.\n\n## Installation\n\n1. Install the latest version of the project from the Python Package Index using `pip install localclustering`.\n2. The only dependency of this project is the `graphscraper` project. `graphscraper` should already be installed after `pip install localclustering`, but it has optional dependencies, one of which must be available on your system:\n * `SQLAlchemy`: It can be installed with `pip install SQLAlchemy`.\n * `Flask-SQLAlchemy`: It can be installed with `pip install Flask-SQLAlchemy`.\n\n## Getting started\n\nThis section will guide you through the basics using `SQLAlchemy` and the `IGraphWrapper` graph implementation from `graphscraper`. `IGraphWrapper` requires the `igraph` project to be installed. You can do this by following the instructions at http://igraph.org/python/.\n\nOnce everything is in place, the analyzed graph can be created:\n\n```\nimport igraph\nfrom graphscraper.igraphwrapper import IGraphWrapper\n\ngraph = IGraphWrapper(igraph.Graph.Famous(\"Zachary\"))\n```\n\nThe next step is the creation of the cluster definition and the preparation of the clustering algorithm:\n\n```\nfrom localclustering.definitions.connectivity import ConnectivityClusterDefinition\nfrom localclustering.localengine import LocalClusterEngine\n\ncluster_definition = ConnectivityClusterDefinition(1.5, 0.85)\nlocal_cluster_engine = LocalClusterEngine(\n cluster_definition, # The cluster definition the algorithm should use.\n source_nodes_in_result=True, # Ensure that source nodes are not removed from the cluster.\n max_cluster_size=34 # Specify an upper limit for the calculated cluster's size.\n)\n```\n\nNow the source node of the clustering must be retrieved:\n\n```\nsource_node = graph.nodes.get_node_by_name(\"2\", can_validate_and_load=True)\n```\n\nAnd finally the cluster analysis can be executed:\n\n```\ncluster = local_cluster_engine.cluster([source_node])\n```\n\nAdditionally you can list the nodes inside the cluster with their rank to get an overview of the result:\n\n```\nrank_provider = local_cluster_engine.get_rank_provider()\nfor node in cluster.nodes:\n print(node.igraph_index, rank_provider.get_node_rank(node))\n```\n\n## Community guidelines\n\nAny form of constructive contribution is welcome:\n\n- Questions, feedback, bug reports: please open an issue in the issue tracker of the project or contact the repository owner in email, whichever you feel appropriate.\n- Contribution to the software: please open an issue in the issue tracker of the project that describes the changes you would like to make to the software and open a pull request with the changes. The description of the pull request must references the corresponding issue.\n\nThe following types of contribution are especially appreciated:\n\n- Implementation of new cluster definitions.\n- Result comparison with global clustering algorithms on well-known and -analyzed graphs.\n- Analysis of how cluster definitions should be configured for graphs with different characteristics.\n- Analysis of how the weighting coefficients of the connectivity based cluster definition corresponding to the different hierarchy levels relate to each-other in different real-world graphs.\n\n## License - GNU AGPLv3\n\nThe library is open-sourced under the conditions of the GNU Affero General Public License v3.0, which is the strongest copyleft license. The reason for using this license is that this library is the \"publication\" of the *Hermina-Janos algorithm* and it should be referenced accordingly.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/volfpeter/localclustering", "keywords": "graph network analysis cluster clustering ranking local hierarchical algorithm", "license": "AGPLv3+", "maintainer": "", "maintainer_email": "", "name": "localclustering", "package_url": "https://pypi.org/project/localclustering/", "platform": "", "project_url": "https://pypi.org/project/localclustering/", "project_urls": { "Homepage": "https://github.com/volfpeter/localclustering" }, "release_url": "https://pypi.org/project/localclustering/0.12.0/", "requires_dist": [ "graphscraper (>=0.4)" ], "requires_python": ">=3.5", "summary": "Python 3 implementation and documentation of the Hermina-Janos local graph clustering algorithm.", "version": "0.12.0" }, "last_serial": 4337561, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "38d76e89eb223738e45691e29b04dd8d", "sha256": "022588e5720b25c948b7a840e19dc92c22b029e8d701059281fab289d005eced" }, "downloads": -1, "filename": "localclustering-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "38d76e89eb223738e45691e29b04dd8d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 25081, "upload_time": "2017-10-08T12:06:59", "url": "https://files.pythonhosted.org/packages/84/77/1fbcc510cd0a8f15a2aab866465343650d3ce6675d7ab033947b8df6897f/localclustering-0.1.0-py3-none-any.whl" } ], "0.10.0": [ { "comment_text": "", "digests": { "md5": "00c6e962d9aa76fe97a1a9729f80262d", "sha256": "c63195156d2bcfbc100649fd6f1015ca5c5ccecdb422fa858adfee87a939cfa6" }, "downloads": -1, "filename": "localclustering-0.10.0-py3-none-any.whl", "has_sig": false, "md5_digest": "00c6e962d9aa76fe97a1a9729f80262d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 25391, "upload_time": "2017-11-18T10:04:14", "url": "https://files.pythonhosted.org/packages/1e/e7/5e0bffc292fc6022cbf3c3faba094e61acb6953dbef4889cbc5e61acdbb5/localclustering-0.10.0-py3-none-any.whl" } ], "0.11.0": [ { "comment_text": "", "digests": { "md5": "2b626c4066c6cb082bee7e629f17ac1e", "sha256": "2d5519cce58ca401a4d54e4d498d85bba2afd03575efd6fbd16121cd4ad81486" }, "downloads": -1, "filename": "localclustering-0.11.0-py3-none-any.whl", "has_sig": false, "md5_digest": "2b626c4066c6cb082bee7e629f17ac1e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 23571, "upload_time": "2018-09-27T19:54:17", "url": "https://files.pythonhosted.org/packages/3a/63/b57f6911748aa7302e45a7791a7a330145ed2abf1612d2b9f5c060509c1e/localclustering-0.11.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b474106123844d7d6feb8a30583ba5d0", "sha256": "cc2f9569973e98398b7e01d8be5d2ed76626daaf43eb789b9bd1e402dfa3c49d" }, "downloads": -1, "filename": "localclustering-0.11.0.tar.gz", "has_sig": false, "md5_digest": "b474106123844d7d6feb8a30583ba5d0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 19334, "upload_time": "2018-09-27T19:54:19", "url": "https://files.pythonhosted.org/packages/e7/0a/21a3b5c0a8b0c945f2376cbc74bf14fb77fdec7a5758bc1c17feaa746a24/localclustering-0.11.0.tar.gz" } ], "0.12.0": [ { "comment_text": "", "digests": { "md5": "fbfed632860f84d4cc7ea717fbd3d4c9", "sha256": "638a7398e59bad2cf9c8273dfc7249089c1a9cf05158536f7425c6061e9f5bfa" }, "downloads": -1, "filename": "localclustering-0.12.0-py3-none-any.whl", "has_sig": false, "md5_digest": "fbfed632860f84d4cc7ea717fbd3d4c9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 23214, "upload_time": "2018-10-03T18:22:54", "url": "https://files.pythonhosted.org/packages/d9/a8/2ad088486c8e7fa3315272acf83a7e4403cb441bf4411ecc75f444ae0b1e/localclustering-0.12.0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fbfed632860f84d4cc7ea717fbd3d4c9", "sha256": "638a7398e59bad2cf9c8273dfc7249089c1a9cf05158536f7425c6061e9f5bfa" }, "downloads": -1, "filename": "localclustering-0.12.0-py3-none-any.whl", "has_sig": false, "md5_digest": "fbfed632860f84d4cc7ea717fbd3d4c9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 23214, "upload_time": "2018-10-03T18:22:54", "url": "https://files.pythonhosted.org/packages/d9/a8/2ad088486c8e7fa3315272acf83a7e4403cb441bf4411ecc75f444ae0b1e/localclustering-0.12.0-py3-none-any.whl" } ] }