Skip to content

rabbanyk/FARZ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FARZ

Benchmarks for Community Detection Algorithms

FARZ is generator/simulator for networks with built-in community structure. It creates graphs/networks with community labels, which can be used for evaluating community detection algorithms.

Generator Parameters

  • main parameters
    • n: number of nodes
    • m: number of edges created per node (i.e. half the average degree of nodes)
    • k: number of communities
  • control parameters
    • beta: the strength of community structure, i.e. the probability of edges to be formed within communities, default (0.8)
    • alpha: the strength of common neighbor's effect on edge formation edges, default (0.5)
    • gamma: the strength of degree similarity effect on edge formation, default (0.5), can be negative for networks with negative degree correlation
  • overlap parameters
    • r: the maximum number of communities each node can belong to, default (1, which results in disjoint communities)
    • q: the probability of a node belonging to the multiple communities, default (0.5, has an effect only if r>1)
  • config parameters
    • phi: the constant added to all community sizes, higher number makes the communities more balanced in size, default (1) which results in power law distribution for community sizes
    • epsilon: the probability of noisy/random edges, default (0.0000001)
    • t: the probability of also connecting to the neighbors of a node each nodes connects to. The default value is (0), but could be increase to a small number to achieve higher clustering coefficient.

How to run

The source code is in Pyhton 2.7. You can generate FARZ benchmarks from FARZ.py in src. See python FARZ.py -h to examine the usage and options; or try the following examples.

Examples

  • example 1: generate a network with 1000 nodes and about 5x1000 edges (m=5), with 4 communities, where 90% of edges fall within communities (beta=0.9)

    python FARZ.py -n 1000 -m 5 -k 4 --beta 0.9

  • example 2: generate a network with properties of example 1, where alpha = 0.2 and gamma = -0.8

    python FARZ.py -n 1000 -m 5 -k 4 --beta 0.9 --alpha 0.2 --gamma -0.8

  • example 3: generate 10 sample networks with properties of example 1 and save them into ./data

    python FARZ.py --path ./data -s 10 -n 1000 -m 5 -k 4 --beta 0.9

  • example 4: repeat example 2, for beta that varies from 0.5 to 1 with 0.05 increments

    python FARZ.py --path ./data -s 10 -v beta -c [0.5,1,0.05] -n 1000 -m 5 -k 4

  • example 5: generate overlapping communities, where each node belongs to at most 3 communities and the portion of overlapping nodes varies, overlapping communities are saved as a list format (a community per line)

    python FARZ.py -r 3 -v q --path ./data -s 5 --format list

Supplementary Materials

http://webdocs.cs.ualberta.ca/~rabbanyk/supp.pdf

Support or Contact

Reihaneh Rabbany, rabbanyk@ualberta.ca

About

Benchmark Generator for Community Detection Validation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages