Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 1.25 KB

README.md

File metadata and controls

42 lines (27 loc) · 1.25 KB

Amortized Community Detection

This repo contains the PyTorch implementation of GCN-CCP.

Graph community detection using CCP + Graph ConvNets (GCN)

Here we use synthetic graphs generated by stochastic block models (SBM) as an example.

Training

cd amortized_community_detection

# GCN-CCP with GraphSAGE encoder
python -m acp.train_acp --model_name acp --data_type sbm_beta_crp --encoder_type graphsage

# GCN-CCP with GatedGCN encoder
python -m acp.train_acp --model_name acp --data_type sbm_beta_crp --encoder_type gatedgcn


Inference -- probablistic clustering

# Cluster SBM graphs using a saved checkpoint
python -m acp.inference.acp_cluster_sbm --data_type sbm_beta_crp --encoder_type graphsage \
  --model_file ./saved_models/xxxx.pt

Other types of data

Mixture of Gaussian (MOG)

python -m acp.train_acp --model_name mog --data_type mog --encoder_type mog