http://franz.com/ns/allegrograph/4.11/sna/communityLeiden

Magic property sna:communityLeiden implements Leiden Community Detection algorithm, it takes a list of keyword arguments:

| Name | Type | Default | Optional | Description | |------------|----------------|---------|----------|-------------------------------------------------------------------------------------------------------------| | generator | Resource | nil | yes | A defined SNA generator | | actor | Resource | nil | yes | A start node (actor) for traversing the RDF graph by the generator | | depth | Numeric | nil | yes | The depth for making an ego group | | selector | Resource | nil | yes | A defined SNA selector | | resolution | Numeric | 1.0 | yes | A parameter that is used when computing the modularity | | beta | Numeric | 0.01 | yes | A parameter that controls the randomness while breaking a community into smaller ones | | iterations | Numeric | -1 | yes | A parameter that controls the total iterations. -1 means iterate until modularity can’t be improved further | | seed | Numeric or nil | nil | yes | A parameter that sets the random generator’s seed to have re-producible communities |

Note that, users must supply either a generator or a selector. When the computation is done, it returns detected communities as ego groups (fully compatible with other operations e.g. sna:groupDegreeCentrality, and each group will be assigned with an integer community ID. For example, the query below not only runs a leiden cummunity detection, but also inserts new triples by utilizing the returned ego groups as well as IDs:

PREFIX sna: <a href="http://franz.com/ns/allegrograph/4.11/sna/">http://franz.com/ns/allegrograph/4.11/sna/</a> PREFIX : <a href="http://franz.com/ns/keyword#">http://franz.com/ns/keyword#</a> </p><p>PREFIX ex: <ex://#> </p><p>INSERT 0} WHERE 1} <code></code>

Notes

The following namespace abbreviations are used:

The SPARQL magic properties reference has additional information on using AllegroGraph magic properties and functions.