Skip to main content

Benchmark of Graph Clustering.

Project description

EAGLEGraphClustering

A benchmark of community detection algorithms from EAGLE-Lab, ZJU

Usage

Run any supported model by :

$ python train.py ${OPTIONAL global args} ${POSITIONAL args (model)} ${optional model args}
  • OPTIONAL global args which should be used before ${model}
    global args description
    -h, --help show this help message and exit
    --dataset Dataset used in the experiment
    --gpu ID of gpu used by cuda
    --dir Path to store the dataset
    --seed Random seed. Defaults to 4096.
    --not_set_seed Force Not to Use Random Seed.
  • POSITIONAL args, i.e., all models supported
    positional args
    (models supported)
    description
    pca_kmeans run community detection on PCA with kmeans
    SDCN run community detection on SDCN
    DANMF run community detection on DANMF
    MNMF run community detection on MNMF
    gae_kmeans run community detection on GAE with Kmeans
    vgae_kmeans run community detection on VGAE with Kmeans
    VGAECD run community detection on VGAECD
    dgi_kmeans run community detection on DGI with Kmeans
    gmi_kmeans run community detection on GMI with Kmeans
    SENet_kmeans run community detection on SENet with Kmeans
    DFCN run community detection on DFCN
    CommunityGAN run community detection on CommunityGAN
    ComE run community detection on ComE

e.g.,

$ python train.py --dataset=Cora gmi_kmeans --l2_coef=0.0

Check all optional args of a model by python train.py ${model} -h.

Datasets

  • Cora, Citeseer, Pubmed come from DGL Lib
  • BlogCatalog, Flickr come from CoLA github
  • ACM come from SDCN github
  • All above datasets are converted to undirected graphs.
Dataset Nodes Edges Attributes Classes
Cora 2708 10556 1433 7
Citeseer 3327 9228 3703 6
Pubmed 19717 88651 500 3
BlogCatalog 5196 343486 8189 6
Flickr 7575 479476 12047 9
ACM 3025 26256 1870 3
CoraFull 19793 126842 8710 70

Implemented baseline methods

Disjoint

Unsupervised Graph Neural Networks + Kmeans

method Conf/Journal Original Code Supproted
VGAE 16nips TensorFlow
GraphSAGE
DGI 19iclr Pytorch
GMI 20www Pytorch
SENet 21Neural Networks

End-to-End Community Detection

method Conf/Journal Original Code Supproted
SDCN 20www Pytorch
DANMF 18cikm code
M-NMF 17aaai Matlab
DFCN 21aaai Pytorch
VGAECD 18icdm --
ComE 17cikm code
DAEGC 19ijcai code

Overlapping

method Conf/Journal Original Code Supproted
CommunityGAN 19www TensorFlow

Installation

# NOTE: python>=3.8 is needed
# Install cuda if necessary. Check Cuda version first.
$ sudo bash .ci/cuda.sh
# Leave out `bash .ci/install-dev.sh &&` if no dev env is needed.
$ bash .ci/install-dev.sh && bash .ci/install.sh
# run `source .env/bin/activate` to activate the virtual env

Requirements

DGL installation guide: https://www.dgl.ai/pages/start.html

torch installation guide: https://pytorch.org/get-started/locally/

  • CUDA 11
python >= 3.8
cudatoolkit >= 11.1.1
torch >= 1.12.0
dgl >= 1.1.0
ogb >= 1.3.3
pylint >= 2.11.1
pre-commit >= 2.15.0
yapf >= 0.31.0
tqdm >= 4.62.3
texttable >= 1.6.4
Cython >= 0.25

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

egc-0.1.2.tar.gz (3.7 MB view hashes)

Uploaded Source

Built Distribution

egc-0.1.2-py3-none-any.whl (351.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page