{"id":17148581,"url":"https://github.com/vtraag/louvain-igraph","last_synced_at":"2025-04-05T03:11:19.982Z","repository":{"id":27815782,"uuid":"31305324","full_name":"vtraag/louvain-igraph","owner":"vtraag","description":"Implementation of the Louvain algorithm for community detection with various methods for use with igraph in python.","archived":false,"fork":false,"pushed_at":"2024-09-04T12:01:46.000Z","size":2550,"stargazers_count":246,"open_issues_count":1,"forks_count":46,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-11-07T07:12:14.515Z","etag":null,"topics":["community-detection","louvain","louvain-algorithm"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vtraag.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-02-25T09:04:01.000Z","updated_at":"2024-09-05T10:03:32.000Z","dependencies_parsed_at":"2024-09-05T12:51:54.045Z","dependency_job_id":"5babc391-a26b-4ac3-a4a5-e66f45e4cec4","html_url":"https://github.com/vtraag/louvain-igraph","commit_stats":{"total_commits":371,"total_committers":6,"mean_commits":"61.833333333333336","dds":"0.021563342318059342","last_synced_commit":"be1f8039ec0b4f88219b7aac58092a9eec0c14aa"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtraag%2Flouvain-igraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtraag%2Flouvain-igraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtraag%2Flouvain-igraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtraag%2Flouvain-igraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vtraag","download_url":"https://codeload.github.com/vtraag/louvain-igraph/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280272,"owners_count":20912967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["community-detection","louvain","louvain-algorithm"],"created_at":"2024-10-14T21:29:08.205Z","updated_at":"2025-04-05T03:11:19.967Z","avatar_url":"https://github.com/vtraag.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"**Warning** \n\nThis package has been superseded by the `leidenalg\n\u003chttps://github.com/vtraag/leidenalg\u003e`_ package and will no longer be\nmaintained.\n\nlouvain-igraph\n==============\n\nThis package implements the louvain algorithm in ``C++`` and exposes it to\n``python``.  It relies on ``(python-)igraph`` for it to function. Besides the\nrelative flexibility of the implementation, it also scales well, and can be run\non graphs of millions of nodes (as long as they can fit in memory). The core\nfunction is ``find_partition`` which finds the optimal partition using the\nlouvain algorithm [1]_ for a number of different methods. The methods currently\nimplemented are (1) modularity [2]_, (2) Reichardt and Bornholdt's model using\nthe configuration null model and the Erdös-Rényi null model [3]_, (3) the\nconstant Potts model (CPM) [4]_, (4) Significance [5]_, and finally (5)\nSurprise [6]_. In addition, it supports multiplex partition optimisation\nallowing community detection on for example negative links [7]_ or multiple\ntime slices [8]_. It also provides some support for community detection on\nbipartite graphs. See the `documentation\n\u003chttp://louvain-igraph.readthedocs.io/en/latest/\u003e`_ for more information.\n\n.. image:: https://readthedocs.org/projects/louvain-igraph/badge\n                :target: http://louvain-igraph.readthedocs.io/en/latest/\n                :alt: Louvain documentation status\n\n.. image:: https://ci.appveyor.com/api/projects/status/sufl628hh8w3guvf?svg=true\n                :target: https://ci.appveyor.com/project/vtraag/louvain-igraph\n                :alt: Louvain build status\n\n.. image:: https://zenodo.org/badge/31305324.svg\n                :target: https://zenodo.org/badge/latestdoi/31305324\n                :alt: DOI\n\n.. image:: https://anaconda.org/conda-forge/louvain/badges/version.svg\n                :target: https://anaconda.org/conda-forge/louvain\n                :alt: Anaconda (conda-forge)\n\nInstallation\n------------\n\nIn short: ``pip install louvain``. All major platforms are supported on\nPython\u003e=3.5, earlier versions of Python are no longer supported. Alternatively,\nyou can install from Anaconda (channels ``conda-forge``).\n\nFor Unix like systems it is possible to install from source. For Windows this is\noverly complicated, and you are recommended to use the binary wheels. The igraph\n``C`` core library is provided within this package, and is automatically\ncompiled. If you encounter any issue with compilation, please see\nhttp://igraph.org. \n\nMake sure you have all necessary tools for compilation. In Ubuntu this can be\ninstalled using ``sudo apt-get install build-essential autoconf automake flex\nbison``, please refer to the documentation for your specific system.  Make sure\nthat not only ``gcc`` is installed, but also ``g++``, as the ``louvain-igraph``\npackage is programmed in ``C++``.\n\nYou can check if all went well by running a variety of tests using ``python\nsetup.py test``.\n\nThere are basically two installation modes, similar to the python-igraph package\nitself (from which most of the setup.py comes).\n\n1. No ``C`` core library is installed yet. The ``C`` core\n   library of igraph that is provided within the ``louvain-igraph`` package is\n   compiled.\n2. A ``C`` core library is already installed. In this case, you may link\n   dynamically to the already installed version by specifying\n   ``--no-pkg-config``. This is probably also the version that is used by the\n   igraph package, but you may want to double check this.\n\nIn case the ``python-igraph`` package is already installed before, make sure that\nboth use the **same versions** (at least the same minor version, which should be\nAPI compatible).\n\nTroubleshooting\n---------------\n\nIn case of any problems, best to start over with a clean environment. Make sure\nyou remove the ``python-igraph`` package completely, remove the ``C`` core\nlibrary and remove the ``louvain-igraph`` package. Then, do a complete reinstall\nstarting from ``pip install louvain-igraph``. In case you want a dynamic library be\nsure to then install the ``C`` core library from source before. Make sure you\n**install the same versions**.\n\nUsage\n-----\n\nThere is no standalone version of ``louvain-igraph``, and you will always need\npython to access it. There are no plans for developing a standalone version or\nR support. So, use python. Please refer to the documentation for more details\non function calls and parameters.\n\nJust to get you started, below the essential parts.\nTo start, make sure to import the packages:\n\n\u003e\u003e\u003e import louvain\n\u003e\u003e\u003e import igraph as ig\n\nWe'll create a random graph for testing purposes:\n\n\u003e\u003e\u003e G = ig.Graph.Erdos_Renyi(100, 0.1);\n\nFor simply finding a partition use:\n\n\u003e\u003e\u003e part = louvain.find_partition(G, louvain.ModularityVertexPartition);\n\nContribute\n----------\n\nSource code: https://github.com/vtraag/louvain-igraph\n\nIssue tracking: https://github.com/vtraag/louvain-igraph/issues\n\nSee the documentation on `Implementation` for more details on how to\ncontribute new methods.\n\nReferences\n----------\n\nPlease cite the references appropriately in case they are used.\n\n.. [1] Blondel, V. D., Guillaume, J.-L., Lambiotte, R., \u0026 Lefebvre, E. (2008).\n       Fast unfolding of communities in large networks. Journal of Statistical\n       Mechanics: Theory and Experiment, 10008(10), 6.\n       `10.1088/1742-5468/2008/10/P10008 \u003chttp://doi.org/10.1088/1742-5468/2008/10/P10008\u003e`_\n\n.. [2] Newman, M. E. J., \u0026 Girvan, M. (2004). Finding and evaluating community\n       structure in networks. Physical Review E, 69(2), 026113.\n       `10.1103/PhysRevE.69.026113 \u003chttp://doi.org/10.1103/PhysRevE.69.026113\u003e`_\n\n.. [3] Reichardt, J., \u0026 Bornholdt, S. (2006). Statistical mechanics of\n       community detection. Physical Review E, 74(1), 016110.\n       `10.1103/PhysRevE.74.016110 \u003chttp://doi.org/10.1103/PhysRevE.74.016110\u003e`_\n\n.. [4] Traag, V. A., Van Dooren, P., \u0026 Nesterov, Y. (2011). Narrow scope for\n       resolution-limit-free community detection. Physical Review E, 84(1),\n       016114.  `10.1103/PhysRevE.84.016114\n       \u003chttp://doi.org/10.1103/PhysRevE.84.016114\u003e`_\n\n.. [5] Traag, V. A., Krings, G., \u0026 Van Dooren, P. (2013). Significant scales in\n       community structure. Scientific Reports, 3, 2930.  `10.1038/srep02930\n       \u003chttp://doi.org/10.1038/srep02930\u003e`_\n\n.. [6] Traag, V. A., Aldecoa, R., \u0026 Delvenne, J.-C. (2015). Detecting\n       communities using asymptotical surprise. Physical Review E, 92(2),\n       022816.  `10.1103/PhysRevE.92.022816\n       \u003chttp://doi.org/10.1103/PhysRevE.92.022816\u003e`_\n\n.. [7] Traag, V. A., \u0026 Bruggeman, J. (2009). Community detection in networks\n       with positive and negative links. Physical Review E, 80(3), 036115.\n       `10.1103/PhysRevE.80.036115\n       \u003chttp://doi.org/10.1103/PhysRevE.80.036115\u003e`_\n\n.. [8] Mucha, P. J., Richardson, T., Macon, K., Porter, M. A., \u0026 Onnela, J.-P.\n       (2010). Community structure in time-dependent, multiscale, and multiplex\n       networks. Science, 328(5980), 876–8. `10.1126/science.1184819\n       \u003chttp://doi.org/10.1126/science.1184819\u003e`_\n\nLicence\n-------\n\nCopyright (C) 2020 V.A. Traag\n\nThis program is free software: you can redistribute it and/or modify it under\nthe terms of the GNU General Public License as published by the Free Software\nFoundation, either version 3 of the License, or (at your option) any later\nversion.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\nPARTICULAR PURPOSE.  See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with\nthis program. If not, see http://www.gnu.org/licenses/.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvtraag%2Flouvain-igraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvtraag%2Flouvain-igraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvtraag%2Flouvain-igraph/lists"}