Skip to content

Commit 41d8356

Browse files
committed
Update documentation, README and CHANGELOG.
1 parent 55115f1 commit 41d8356

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

CHANGELOG

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
NEXT RELEASE
1+
0.8.2
22
- New option to constrain community size by @orenbenkiki (PR #46)
33
- Great performance improvement by @ragibson (PR #40)
44
- Minor improvements and clarifications

README.rst

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@ This package implements the Leiden algorithm in ``C++`` and exposes it to
66
relative flexibility of the implementation, it also scales well, and can be run
77
on graphs of millions of nodes (as long as they can fit in memory). The core
88
function is ``find_partition`` which finds the optimal partition using the
9-
Leiden algorithm [1]_, which is an extension of the Louvain algorithm [2]_ for
10-
a number of different methods. The methods currently implemented are (1)
9+
Leiden algorithm [1]_, which is an extension of the Louvain algorithm [2]_ for a
10+
number of different methods. The methods currently implemented are (1)
1111
modularity [3]_, (2) Reichardt and Bornholdt's model using the configuration
1212
null model and the Erdös-Rényi null model [4]_, (3) the constant Potts model
1313
(CPM) [5]_, (4) Significance [6]_, and finally (5) Surprise [7]_. In addition,
14-
it supports multiplex partition optimisation allowing community detection on
15-
for example negative links [8]_ or multiple time slices [9]_. There is the possibility of only partially optimising a partition, so that some community assignments remain fixed [10]_. It also provides
16-
some support for community detection on bipartite graphs. See the
17-
`documentation <http://leidenalg.readthedocs.io/en/latest/>`_ for more
18-
information.
14+
it supports multiplex partition optimisation allowing community detection on for
15+
example negative links [8]_ or multiple time slices [9]_. There is the
16+
possibility of only partially optimising a partition, so that some community
17+
assignments remain fixed [10]_. It also provides some support for community
18+
detection on bipartite graphs. See the `documentation
19+
<http://leidenalg.readthedocs.io/en/latest/>`_ for more information.
1920

2021
.. image:: https://readthedocs.org/projects/leidenalg/badge
2122
:target: http://leidenalg.readthedocs.io/en/latest/
@@ -27,7 +28,7 @@ information.
2728

2829
.. image:: https://zenodo.org/badge/146722095.svg
2930
:target: https://zenodo.org/badge/latestdoi/146722095
30-
:alt: DOI
31+
:alt: DOI
3132

3233
.. image:: https://anaconda.org/conda-forge/leidenalg/badges/version.svg
3334
:target: https://anaconda.org/conda-forge/leidenalg
@@ -38,13 +39,13 @@ Installation
3839

3940
In short: ``pip install leidenalg``. All major platforms are supported on
4041
Python>=3.5, earlier versions of Python are no longer supported. Alternatively,
41-
you can install from Anaconda (channels ``conda-forge``).
42+
you can install from Anaconda (channel ``conda-forge``).
4243

4344
For Unix like systems it is possible to install from source. For Windows this is
4445
overly complicated, and you are recommended to use the binary wheels. The igraph
4546
``C`` core library is provided within this package, and is automatically
4647
compiled. If you encounter any issue with compilation, please see
47-
http://igraph.org.
48+
http://igraph.org.
4849

4950
Make sure you have all necessary tools for compilation. In Ubuntu this can be
5051
installed using ``sudo apt-get install build-essential autoconf automake flex
@@ -129,7 +130,7 @@ Please cite the references appropriately in case they are used.
129130
130131
.. [2] Blondel, V. D., Guillaume, J.-L., Lambiotte, R., & Lefebvre, E. (2008).
131132
Fast unfolding of communities in large networks. Journal of Statistical
132-
Mechanics: Theory and Experiment, 10008(10), 6.
133+
Mechanics: Theory and Experiment, 10008(10), 6.
133134
`10.1088/1742-5468/2008/10/P10008 <http://doi.org/10.1088/1742-5468/2008/10/P10008>`_
134135
135136
.. [3] Newman, M. E. J., & Girvan, M. (2004). Finding and evaluating community

doc/source/advanced.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,16 @@ We can then only update the community assignments for the new nodes as follows
227227
In this example we used :class:`~leidenalg.CPMVertexPartition`. but any other
228228
``VertexPartition`` would work as well.
229229

230+
Maximum community size
231+
----------------------
232+
233+
In some cases, you may want to restrict the community sizes. It is possible to indicate this
234+
by setting the :attr:`~leidenalg.Optimiser.max_comm_size` parameter so that this constraint is
235+
taken into account during optimisation. In addition, it is possible to pass this parameter
236+
directly when using :func:`~leidenalg.find_partition`. For example
237+
238+
>>> partition = la.find_partition(G, la.ModularityVertexPartition, max_comm_size=10)
239+
230240
References
231241
----------
232242
.. [1] Traag, V. A., Krings, G., & Van Dooren, P. (2013). Significant scales in

0 commit comments

Comments
 (0)