Skip to content

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LFRBenchmarkGraphs

Stable Dev Build Status Coverage Code Style: Blue Aqua QA DOI

Overview

This is a package for generating Lancichinetti-Fortunato-Radicchi model benchmarks graphs, which are widely used in the study of community detection algorithms.

Installation

Installation is straightforward. First, enter Pkg mode by hitting ], and then run the following command:

pkg> add LFRBenchmarkGraphs

Example usage

Dependencies for this demo

Import the necessary packages.

using GraphMakie, CairoMakie, LFRBenchmarkGraphs, Graphs

Graph generation

Generate an example LFR graph using the LFR benchmark. The LFR benchmark is a popular benchmark for community detection algorithms. It generates graphs with a power-law degree distribution and a community structure.

g,cid = lancichinetti_fortunato_radicchi(1000, 15, 40);

Visualize graph

We use the GraphMakie package to visualize the graph, with the default layout algorithm.

f = Figure()
ax = Axis(f[1, 1], title = "LFR graph", xticklabelsvisible = false, yticklabelsvisible = false)
graphplot!(ax, g; edge_width = 0.1, node_color = cid, node_size = 6)
colsize!(f.layout, 1, Aspect(1, 1.0))
resize_to_layout!(f)
f

About

Lancichinetti-Fortunato-Radicchi (LFR) benchmark graphs to evaluate community detection algorithms.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages